Changeset - 703d3208424c
[Not reviewed]
Bradley M. Kuhn - 11 years ago 2014-07-03 01:05:41
bkuhn@sfconservancy.org
Rename various strings for tests
11 files changed with 46 insertions and 158 deletions:
0 comments (0 inline, 0 general)
.travis.yml
Show inline comments
 
language: python
 
python:
 
  - "2.5"
 
  - "2.6"
 
  - "2.7"
 

	
 
env:  
 
  - TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/rhodecode_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/rhodecode_test
 
  - TEST_DB=sqlite:////tmp/kallithea_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/kallithea_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/kallithea_test
 

	
 
services:
 
  - mysql
 
  - postgresql
 

	
 
# command to install dependencies
 
before_script:
 
  - mysql -e 'create database rhodecode_test;'
 
  - psql -c 'create database rhodecode_test;' -U postgres
 
  - mysql -e 'create database kallithea_test;'
 
  - psql -c 'create database kallithea_test;' -U postgres
 
  - git --version
 

	
 
before_install:
 
  - sudo apt-get remove git
 
  - sudo add-apt-repository ppa:pdoes/ppa -y
 
  - sudo apt-get update -y
 
  - sudo apt-get install git -y
 

	
 
install:
 
  - pip install mysql-python psycopg2 mock unittest2
 
  - pip install . --use-mirrors
 

	
docs/contributing.rst
Show inline comments
 
@@ -32,20 +32,20 @@ the `development.ini` file as rc.ini (wh
 
and put all your changes like db connection or server port in there.
 

	
 
After finishing your changes make sure all tests passes ok. You can run
 
the testsuite running ``nosetest`` from the project root, or if you use tox
 
run tox for python2.5-2.7 with multiple database test. When using `nosetests`
 
test.ini file is used and by default it uses sqlite for tests, edit this file
 
to change your testing enviroment.
 

	
 

	
 
There's a special set of tests for push/pull operations, you can runn them using::
 

	
 
    paster serve test.ini --pid-file=test.pid --daemon
 
    RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x kallithea/tests/other/test_vcs_operations.py
 
    KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests -x kallithea/tests/other/test_vcs_operations.py
 
    kill -9 $(cat test.pid)
 

	
 

	
 
| Thank you for any contributions!
 

	
 

	
 
.. _bitbucket: http://bitbucket.org/
kallithea/config/environment.py
Show inline comments
 
@@ -82,38 +82,38 @@ def load_environment(global_conf, app_co
 
    config['pylons.app_globals'].mako_lookup = TemplateLookup(
 
        directories=paths['templates'],
 
        error_handler=handle_mako_error,
 
        module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
 
        input_encoding='utf-8', default_filters=['escape'],
 
        imports=['from webhelpers.html import escape'])
 

	
 
    # sets the c attribute access when don't existing attribute are accessed
 
    config['pylons.strict_tmpl_context'] = True
 
    test = os.path.split(config['__file__'])[-1] == 'test.ini'
 
    if test:
 
        if test_env is None:
 
            test_env = not int(os.environ.get('RC_NO_TMP_PATH', 0))
 
            test_env = not int(os.environ.get('KALLITHEA_NO_TMP_PATH', 0))
 
        if test_index is None:
 
            test_index = not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0))
 
            test_index = not int(os.environ.get('KALLITHEA_WHOOSH_TEST_DISABLE', 0))
 
        if os.environ.get('TEST_DB'):
 
            # swap config if we pass enviroment variable
 
            config['sqlalchemy.db1.url'] = os.environ.get('TEST_DB')
 

	
 
        from kallithea.lib.utils import create_test_env, create_test_index
 
        from kallithea.tests import TESTS_TMP_PATH
 
        #set RC_NO_TMP_PATH=1 to disable re-creating the database and
 
        #set KALLITHEA_NO_TMP_PATH=1 to disable re-creating the database and
 
        #test repos
 
        if test_env:
 
            create_test_env(TESTS_TMP_PATH, config)
 
        #set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        #set KALLITHEA_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        if test_index:
 
            create_test_index(TESTS_TMP_PATH, config, True)
 

	
 
    DbManage.check_waitress()
 
    # MULTIPLE DB configs
 
    # Setup the SQLAlchemy database engine
 
    sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
 
    init_model(sa_engine_db1)
 

	
 
    set_available_permissions(config)
 
    repos_path = make_ui('db').configitems('paths')[0][1]
 
    config['base_path'] = repos_path
kallithea/tests/__init__.py
Show inline comments
 
@@ -19,26 +19,26 @@ This package assumes the Pylons environm
 
when this script is imported from the `nosetests --with-pylons=test.ini`
 
command.
 

	
 
This module initializes the application via ``websetup`` (`paster
 
setup-app`) and provides the base testing objects.
 

	
 
nosetests -x - fail on first error
 
nosetests kallithea.tests.functional.test_admin_settings:TestSettingsController.test_my_account
 
nosetests --pdb --pdb-failures
 
nosetests --with-coverage --cover-package=kallithea.model.validators kallithea.tests.test_validators
 

	
 
optional FLAGS:
 
    RC_WHOOSH_TEST_DISABLE=1 - skip whoosh index building and tests
 
    RC_NO_TMP_PATH=1 - disable new temp path for tests, used mostly for test_vcs_operations
 
    KALLITHEA_WHOOSH_TEST_DISABLE=1 - skip whoosh index building and tests
 
    KALLITHEA_NO_TMP_PATH=1 - disable new temp path for tests, used mostly for test_vcs_operations
 

	
 
"""
 
import os
 
import time
 
import logging
 
import datetime
 
import hashlib
 
import tempfile
 
from os.path import join as jn
 

	
 
from tempfile import _RandomNameSequence
 

	
kallithea/tests/api/api_base.py
Show inline comments
 
@@ -6,25 +6,25 @@
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
"""
 
tests for api. run with::
 

	
 
    RC_WHOOSH_TEST_DISABLE=1 nosetests --with-coverage --cover-package=kallithea.controllers.api.api -x kallithea/tests/api
 
    KALLITHEA_WHOOSH_TEST_DISABLE=1 nosetests --with-coverage --cover-package=kallithea.controllers.api.api -x kallithea/tests/api
 
"""
 

	
 
from __future__ import with_statement
 
import os
 
import random
 
import mock
 

	
 
from kallithea.tests import *
 
from kallithea.tests.fixture import Fixture
 
from kallithea.lib.compat import json
 
from kallithea.lib.auth import AuthUser
 
from kallithea.model.user import UserModel
kallithea/tests/fixtures/journal_dump.csv
Show inline comments
 
@@ -188,29 +188,29 @@ user_log_id,user_id,username,repository_
 
232,38,zenqw,52,fork-fork-test-12345_2,217.153.157.250,pull,2012-07-11 13:15:52.326756
 
233,38,zenqw,52,fork-fork-test-12345_2,217.153.157.250,"push:b9567e91f6ee7cd18b6332608a5a0ed12256ea48,2f709872121b0875b02f4fbfafa8fccd4c0613db",2012-07-11 13:16:51.063259
 
234,38,zenqw,51,fork-test-12345,"",user_commented_pull_request:7,2012-07-11 13:18:04.300327
 
239,40,cowwoc,54,glib,"",user_created_repo,2012-07-12 00:09:07.883466
 
240,3,demo,38,code-review-test,"",user_commented_pull_request:8,2012-07-12 00:50:50.791122
 
241,3,demo,38,code-review-test,"",user_commented_pull_request:8,2012-07-12 00:51:04.795167
 
242,3,demo,38,code-review-test,"",user_commented_revision:fba17a64fa4978bfea19222da5e64a18cfddeecd,2012-07-12 13:41:59.717658
 
243,43,lpyedge,55,group/brhg,"",started_following_repo,2012-07-12 15:09:28.550696
 
244,43,lpyedge,55,group/brhg,"",user_created_repo,2012-07-12 15:09:28.562524
 
245,43,lpyedge,56,brgit,"",started_following_repo,2012-07-12 15:18:17.687605
 
246,43,lpyedge,56,brgit,"",user_created_repo,2012-07-12 15:18:17.702136
 
247,1,default,34,a,54.247.183.89,pull,2012-07-12 16:53:15.165512
 
248,45,krhodecode,1,test,"",user_commented_revision:ef02269209cd431c0cd0ee929ba37ae895651d69,2012-07-12 23:09:25.38717
 
249,45,krhodecode,42,foo,"",user_commented_revision:ca953e8c5c1ada44e9a8f945a0a6999d2f44310d,2012-07-12 23:14:07.819338
 
250,45,krhodecode,57,SuperProject,"",started_following_repo,2012-07-12 23:17:38.213634
 
251,45,krhodecode,57,SuperProject,"",user_created_repo,2012-07-12 23:17:38.229359
 
252,45,krhodecode,57,SuperProject,216.51.137.66,push:a3188ce9ed64822ceae497665910c2e18cddf021,2012-07-12 23:23:23.111788
 
248,45,kxxx,1,test,"",user_commented_revision:ef02269209cd431c0cd0ee929ba37ae895651d69,2012-07-12 23:09:25.38717
 
249,45,kxxx,42,foo,"",user_commented_revision:ca953e8c5c1ada44e9a8f945a0a6999d2f44310d,2012-07-12 23:14:07.819338
 
250,45,kxxx,57,SuperProject,"",started_following_repo,2012-07-12 23:17:38.213634
 
251,45,kxxx,57,SuperProject,"",user_created_repo,2012-07-12 23:17:38.229359
 
252,45,kxxx,57,SuperProject,216.51.137.66,push:a3188ce9ed64822ceae497665910c2e18cddf021,2012-07-12 23:23:23.111788
 
253,3,demo,38,code-review-test,"",user_commented_revision:fba17a64fa4978bfea19222da5e64a18cfddeecd,2012-07-13 14:22:00.003158
 
254,46,snazy2000,58,group/Test,"",started_following_repo,2012-07-13 19:14:31.959033
 
255,46,snazy2000,58,group/Test,"",user_created_repo,2012-07-13 19:14:31.972509
 
256,2,admin,1,test,"",user_commented_revision:ef02269209cd431c0cd0ee929ba37ae895651d69,2012-07-15 03:03:17.100702
 
204,34,qqqqq,,zaraza,"",started_following_repo,2012-07-08 01:43:26.053084
 
205,34,qqqqq,,zaraza,"",user_created_repo,2012-07-08 01:43:26.067756
 
215,35,kvaster,,asd,"",started_following_repo,2012-07-09 22:03:29.676651
 
216,35,kvaster,,asd,"",user_created_repo,2012-07-09 22:03:29.688872
 
219,37,tester,,test2,"",started_following_repo,2012-07-11 11:07:19.065559
 
220,37,tester,,test2,"",user_created_repo,2012-07-11 11:07:19.080323
 
257,2,admin,38,code-review-test,"",user_commented_pull_request:8,2012-07-15 03:21:36.545532
 
258,2,admin,38,code-review-test,"",user_closed_pull_request:8,2012-07-15 03:21:36.556543
 
@@ -602,28 +602,28 @@ user_log_id,user_id,username,repository_
 
650,3,demo,132,test-alex,"",started_following_repo,2012-08-13 21:21:05.904895
 
651,3,demo,132,test-alex,"",user_created_repo,2012-08-13 21:21:05.916732
 
652,3,demo,132,test-alex,"",push_local:016bda6a3079ea1d69b6a309a9ecc61fe5b671df,2012-08-13 21:21:34.951309
 
653,3,demo,132,test-alex,"",user_commented_revision:016bda6a3079ea1d69b6a309a9ecc61fe5b671df,2012-08-13 21:22:06.758798
 
654,3,demo,132,test-alex,"",push_local:7f43f5167e26a3e43e6ad0ac6539ab4c8589a509,2012-08-13 21:22:18.07678
 
655,3,demo,132,test-alex,"",user_commented_revision:7f43f5167e26a3e43e6ad0ac6539ab4c8589a509,2012-08-13 21:22:39.209522
 
656,3,demo,132,test-alex,"",push_local:9b754ec30decff4c11c0f82522b7ec9dd732b738,2012-08-13 21:23:44.132906
 
657,3,demo,132,test-alex,"",user_commented_revision:9b754ec30decff4c11c0f82522b7ec9dd732b738,2012-08-13 21:24:34.975113
 
658,3,demo,132,test-alex,"",push_local:625c046f35779ccde8c2284ee60fda3d9598e8bb,2012-08-13 21:25:07.493234
 
659,3,demo,132,test-alex,"",push_local:807dd6bb60f5eef82f7ffdd988dee3e0de4e44dc,2012-08-13 21:26:51.764858
 
660,3,demo,132,test-alex,"",push_local:24224f94a8578508883f58982e10b0ffa83a98d6,2012-08-13 21:28:03.831471
 
661,3,demo,42,foo,"",user_commented_revision:ca953e8c5c1ada44e9a8f945a0a6999d2f44310d,2012-08-14 18:40:46.618059
 
662,118,peso-rhodecode,99,another-fork-to-check-code-review,"",user_commented_revision:30853f4bde2f2b6f0a7126392b9b1b4c5ea37e0a,2012-08-14 18:58:56.536013
 
663,118,peso-rhodecode,99,another-fork-to-check-code-review,"",user_commented_revision:30853f4bde2f2b6f0a7126392b9b1b4c5ea37e0a,2012-08-14 18:59:58.982696
 
664,118,peso-rhodecode,133,tortoisehg,"",started_following_repo,2012-08-14 19:05:14.873877
 
665,118,peso-rhodecode,133,tortoisehg,"",user_created_repo,2012-08-14 19:05:14.88921
 
662,118,peso-xxx,99,another-fork-to-check-code-review,"",user_commented_revision:30853f4bde2f2b6f0a7126392b9b1b4c5ea37e0a,2012-08-14 18:58:56.536013
 
663,118,peso-xxx,99,another-fork-to-check-code-review,"",user_commented_revision:30853f4bde2f2b6f0a7126392b9b1b4c5ea37e0a,2012-08-14 18:59:58.982696
 
664,118,peso-xxx,133,tortoisehg,"",started_following_repo,2012-08-14 19:05:14.873877
 
665,118,peso-xxx,133,tortoisehg,"",user_created_repo,2012-08-14 19:05:14.88921
 
666,119,ricardona,39,fork-code-review-test,"",user_commented_revision:ac19ef61aab0b008acb5dac5d53457cbd278d927,2012-08-14 21:20:28.585574
 
667,3,demo,134,TestIM,"",started_following_repo,2012-08-14 22:23:05.22279
 
668,3,demo,134,TestIM,"",user_created_repo,2012-08-14 22:23:05.235172
 
669,3,demo,134,TestIM,216.16.228.6,push:b3b6cfdb515f13709b13f82d20efd74daaa11d91,2012-08-14 22:23:54.286624
 
670,3,demo,134,TestIM,216.16.228.6,push:9fb9ba572906576b2cc53ac227d503317f019556,2012-08-14 22:24:48.190215
 
671,3,demo,134,TestIM,"",user_commented_pull_request:26,2012-08-14 22:25:32.752851
 
672,3,demo,134,TestIM,"",user_commented_pull_request:26,2012-08-14 22:26:29.238006
 
673,3,demo,134,TestIM,"",user_closed_pull_request:26,2012-08-14 22:26:29.246245
 
674,3,demo,134,TestIM,216.16.228.6,push:55a4fabac6221f988a276ec34343b947dfbc8a1f,2012-08-14 22:35:56.966751
 
676,120,asdfqwer,135,Asdf,"",started_following_repo,2012-08-15 01:25:41.462335
 
677,120,asdfqwer,135,Asdf,"",user_created_repo,2012-08-15 01:25:41.473404
 
678,120,asdfqwer,135,Asdf,"",push_local:e43db28406d1d0697f504af9bc2ae5c5b789bba3,2012-08-15 01:27:34.991
 
@@ -747,47 +747,47 @@ user_log_id,user_id,username,repository_
 
798,3,demo,159,group/Test-for-code-review,"",user_updated_repo,2012-08-30 18:46:21.757499
 
799,3,demo,159,group/Test-for-code-review,"",push_local:1ea6c5155c207b823306f6d4135975cd62de5ea6,2012-08-30 19:06:37.805225
 
800,3,demo,159,group/Test-for-code-review,"",user_commented_revision:1ea6c5155c207b823306f6d4135975cd62de5ea6,2012-08-30 19:07:57.905038
 
801,1,default,159,group/Test-for-code-review,176.9.28.203,pull,2012-08-30 19:12:18.946031
 
802,3,demo,160,group/test-der-zweite,"",started_following_repo,2012-08-30 19:12:19.100001
 
803,3,demo,160,group/test-der-zweite,"",user_created_repo,2012-08-30 19:12:19.109789
 
804,3,demo,160,group/test-der-zweite,"",user_commented_revision:1ea6c5155c207b823306f6d4135975cd62de5ea6,2012-08-30 19:12:33.306323
 
805,3,demo,159,group/Test-for-code-review,"",user_commented_revision:1ea6c5155c207b823306f6d4135975cd62de5ea6,2012-08-30 19:14:51.326684
 
806,3,demo,159,group/Test-for-code-review,"",user_commented_revision:1ea6c5155c207b823306f6d4135975cd62de5ea6,2012-08-30 19:14:54.354662
 
807,3,demo,159,group/Test-for-code-review,"",user_commented_revision:2305443e5a06a9d80e328741d2da742145f80eee,2012-08-30 19:15:23.722829
 
808,150,dlamotte,1,test,"",user_commented_pull_request:31,2012-08-30 23:03:25.180892
 
809,150,dlamotte,1,test,"",user_closed_pull_request:31,2012-08-30 23:03:25.192118
 
810,150,dlamotte,161,test-rhodecode-pull-request,"",started_following_repo,2012-08-30 23:05:08.817245
 
811,150,dlamotte,161,test-rhodecode-pull-request,"",user_created_repo,2012-08-30 23:05:08.832769
 
812,150,dlamotte,161,test-rhodecode-pull-request,143.127.128.10,push:e839aac4f06bb1f0dde813d6b7e80cc345f8d70d,2012-08-30 23:06:12.300969
 
813,150,dlamotte,161,test-rhodecode-pull-request,143.127.128.10,"push:1b01a9f3ba4951615f1c9cfbe19ea62f3abeed9f,062ab363eaef7fc73342a93f4624030103fc36f9",2012-08-30 23:08:29.621962
 
810,150,dlamotte,161,test-xxx-pull-request,"",started_following_repo,2012-08-30 23:05:08.817245
 
811,150,dlamotte,161,test-xxx-pull-request,"",user_created_repo,2012-08-30 23:05:08.832769
 
812,150,dlamotte,161,test-xxx-pull-request,143.127.128.10,push:e839aac4f06bb1f0dde813d6b7e80cc345f8d70d,2012-08-30 23:06:12.300969
 
813,150,dlamotte,161,test-xxx-pull-request,143.127.128.10,"push:1b01a9f3ba4951615f1c9cfbe19ea62f3abeed9f,062ab363eaef7fc73342a93f4624030103fc36f9",2012-08-30 23:08:29.621962
 
814,1,default,1,test,176.9.28.203,pull,2012-08-30 23:14:51.336754
 
815,151,mill1359,162,test-m,"",started_following_repo,2012-08-30 23:14:51.499881
 
816,151,mill1359,162,test-m,"",user_created_repo,2012-08-30 23:14:51.509169
 
817,1,default,162,test-m,143.127.128.10,pull,2012-08-30 23:16:00.219245
 
818,151,mill1359,162,test-m,143.127.128.10,push:8a528cebe032d5502c73608281a954233347ce36,2012-08-30 23:19:20.205642
 
819,151,mill1359,162,test-m,"",user_commented_pull_request:32,2012-08-30 23:21:27.6093
 
820,151,mill1359,162,test-m,"",user_closed_pull_request:32,2012-08-30 23:21:27.617668
 
821,155,cdugz,163,nagios,"",started_following_repo,2012-08-31 16:42:33.825148
 
822,155,cdugz,163,nagios,"",user_created_repo,2012-08-31 16:42:33.83886
 
895,3,demo,122,amab,"",push_local:f0509a4f718f5a31eafcb8fbe9caf21a642c5753,2012-09-05 01:30:02.737976
 
896,3,demo,32,big-project,"",user_commented_revision:06d5302c4830e5af52f06c462f11f75107b2a1ff,2012-09-05 11:05:19.904842
 
823,155,cdugz,163,nagios,82.150.248.28,"push:380d5c3fd6c3948d5da3f56859104f4adf629553,30b5773f0f9d57cfb721576169685b36878969d1,47deef50eface398daa8ba09a6d79a9db2585c4f,a38d5508f516f360cd603a72cd4a4f16facf5825,cf7656e6c2cb29241db1f6ae0af2823684d7d0b4,0ebf06f94b584abe59853618ca68b9416f13fe20,413886edff138d8de1e3e23698fabba444de6167,335bb28b7c5428044f17ef9bc57a992b759b2d93,feba8837f9ac8af56b6588e8fcc7710eeeebd327,bf0781be32a59aef35f8bf95a2f614894e773926,fc3792349c770fe014d0774e980e3bba600bb5a6",2012-08-31 16:46:05.896127
 
824,155,cdugz,164,rhodecode-ref,"",started_following_repo,2012-08-31 17:42:24.794235
 
825,155,cdugz,164,rhodecode-ref,"",user_created_repo,2012-08-31 17:42:24.806839
 
826,155,cdugz,164,rhodecode-ref,82.150.248.28,"push:380d5c3fd6c3948d5da3f56859104f4adf629553,30b5773f0f9d57cfb721576169685b36878969d1,47deef50eface398daa8ba09a6d79a9db2585c4f,c91bea8206218cf051c6b0ab6a352c7371b5212d",2012-08-31 17:43:03.365708
 
827,155,cdugz,164,rhodecode-ref,"",user_updated_repo,2012-08-31 17:44:01.673127
 
828,155,cdugz,165,rhodecode-dev,"",started_following_repo,2012-08-31 17:44:52.870468
 
829,155,cdugz,165,rhodecode-dev,"",user_created_repo,2012-08-31 17:44:52.880649
 
830,155,cdugz,165,rhodecode-dev,82.150.248.28,"push:380d5c3fd6c3948d5da3f56859104f4adf629553,30b5773f0f9d57cfb721576169685b36878969d1,47deef50eface398daa8ba09a6d79a9db2585c4f,107236f51ef01fcb27d1c613c18a93a2135c336c,2ff774f5163960e356530826b4faad804bd79972,e4b37340f046c2910a43017d814841df1caec1cf,c91bea8206218cf051c6b0ab6a352c7371b5212d,3e5071670c8eec699744bd94f9ebacba8ef33b1f,06303e4e0da2b0e909d985844fc573e3a32547a2",2012-08-31 17:45:20.027085
 
824,155,cdugz,164,xxx-ref,"",started_following_repo,2012-08-31 17:42:24.794235
 
825,155,cdugz,164,xxx-ref,"",user_created_repo,2012-08-31 17:42:24.806839
 
826,155,cdugz,164,xxx-ref,82.150.248.28,"push:380d5c3fd6c3948d5da3f56859104f4adf629553,30b5773f0f9d57cfb721576169685b36878969d1,47deef50eface398daa8ba09a6d79a9db2585c4f,c91bea8206218cf051c6b0ab6a352c7371b5212d",2012-08-31 17:43:03.365708
 
827,155,cdugz,164,xxx-ref,"",user_updated_repo,2012-08-31 17:44:01.673127
 
828,155,cdugz,165,xxx-dev,"",started_following_repo,2012-08-31 17:44:52.870468
 
829,155,cdugz,165,xxx-dev,"",user_created_repo,2012-08-31 17:44:52.880649
 
830,155,cdugz,165,xxx-dev,82.150.248.28,"push:380d5c3fd6c3948d5da3f56859104f4adf629553,30b5773f0f9d57cfb721576169685b36878969d1,47deef50eface398daa8ba09a6d79a9db2585c4f,107236f51ef01fcb27d1c613c18a93a2135c336c,2ff774f5163960e356530826b4faad804bd79972,e4b37340f046c2910a43017d814841df1caec1cf,c91bea8206218cf051c6b0ab6a352c7371b5212d,3e5071670c8eec699744bd94f9ebacba8ef33b1f,06303e4e0da2b0e909d985844fc573e3a32547a2",2012-08-31 17:45:20.027085
 
831,3,demo,93,fork-a,"",push_local:416552904882d8b8f051cad2071f4aa271d4ea4e,2012-08-31 18:50:50.885869
 
832,3,demo,166,dfgdfg,"",started_following_repo,2012-08-31 18:56:16.94572
 
833,3,demo,166,dfgdfg,"",user_created_repo,2012-08-31 18:56:16.959102
 
834,3,demo,166,dfgdfg,"",user_updated_repo,2012-08-31 18:56:40.349443
 
835,3,demo,166,dfgdfg,"",user_updated_repo,2012-08-31 18:56:43.138614
 
836,3,demo,167,group/test1234,"",started_following_repo,2012-09-01 13:16:21.279844
 
837,3,demo,167,group/test1234,"",user_created_repo,2012-09-01 13:16:21.293767
 
838,3,demo,168,group/test_interface,"",started_following_repo,2012-09-01 16:31:43.486262
 
839,3,demo,168,group/test_interface,"",user_created_repo,2012-09-01 16:31:43.500171
 
840,3,demo,169,group/demo_interface,"",started_following_repo,2012-09-01 16:33:21.416702
 
841,3,demo,169,group/demo_interface,"",user_created_repo,2012-09-01 16:33:21.429822
 
842,3,demo,169,group/demo_interface,"",user_updated_repo,2012-09-01 16:34:48.888958
 
@@ -863,25 +863,25 @@ user_log_id,user_id,username,repository_
 
914,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:38:45.300458
 
915,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:39:01.382629
 
916,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:39:18.062238
 
917,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:39:27.350966
 
918,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:39:37.275952
 
919,3,demo,34,a,"",user_updated_repo,2012-09-05 13:40:21.966185
 
920,3,demo,34,a,"",user_commented_pull_request:37,2012-09-05 13:40:53.832787
 
921,3,demo,34,a,"",user_closed_pull_request:37,2012-09-05 13:40:53.837264
 
922,3,demo,34,a,"",user_commented_pull_request:38,2012-09-05 13:41:51.071776
 
923,3,demo,34,a,"",user_closed_pull_request:38,2012-09-05 13:41:51.082763
 
924,3,demo,34,a,"",user_updated_repo,2012-09-05 13:42:28.045216
 
925,3,demo,176,hopsa,"",started_following_repo,2012-09-05 14:12:14.479866
 
926,3,demo,165,rhodecode-dev,"",user_forked_repo:hopsa,2012-09-05 14:12:14.495649
 
926,3,demo,165,xxx-dev,"",user_forked_repo:hopsa,2012-09-05 14:12:14.495649
 
927,3,demo,176,hopsa,"",user_created_fork:hopsa,2012-09-05 14:12:14.507312
 
928,3,demo,177,blah,"",started_following_repo,2012-09-05 16:42:29.860682
 
929,3,demo,177,blah,"",user_created_repo,2012-09-05 16:42:29.876509
 
930,3,demo,178,myfolder-myrepo,"",started_following_repo,2012-09-05 17:33:08.753339
 
931,3,demo,178,myfolder-myrepo,"",user_created_repo,2012-09-05 17:33:08.765789
 
932,3,demo,180,MineReps,"",started_following_repo,2012-09-05 23:11:25.562383
 
933,3,demo,180,MineReps,"",user_created_repo,2012-09-05 23:11:25.577972
 
934,3,demo,33,fork-big-project,"",user_commented_revision:51cec0b8c8a0e47d8edc81d5ffb5f77723c5cbf9,2012-09-06 01:29:52.749682
 
935,3,demo,33,fork-big-project,"",user_commented_revision:51cec0b8c8a0e47d8edc81d5ffb5f77723c5cbf9,2012-09-06 01:30:05.246986
 
936,1,default,68,aaa-project,94.194.60.137,pull,2012-09-06 02:51:08.186518
 
937,1,default,68,aaa-project,94.194.60.137,pull,2012-09-06 02:54:47.80033
 
938,1,default,159,group/Test-for-code-review,"",push_local:e25e53f9a9cd4a39bb085830a67983bc6dd46e76,2012-09-06 03:08:45.578824
 
@@ -924,26 +924,26 @@ user_log_id,user_id,username,repository_
 
975,3,demo,187,ptest,89.72.81.164,push:20312aeb821607689952b2e56de6167927c2790b,2012-09-07 20:40:50.055559
 
976,3,demo,187,ptest,"",user_commented_revision:20312aeb821607689952b2e56de6167927c2790b,2012-09-07 20:43:26.445007
 
977,141,asdf1234asdf,188,fork-Asdf,"",started_following_repo,2012-09-07 21:22:53.452145
 
978,141,asdf1234asdf,135,Asdf,"",user_forked_repo:fork-Asdf,2012-09-07 21:22:53.472411
 
979,141,asdf1234asdf,188,fork-Asdf,"",user_created_fork:fork-Asdf,2012-09-07 21:22:53.485295
 
980,141,asdf1234asdf,188,fork-Asdf,"",push_local:cf7c116b1345f1aa0b1df0d1c36abce396082561,2012-09-07 21:23:31.404039
 
981,141,asdf1234asdf,135,Asdf,"",user_commented_pull_request:40,2012-09-07 21:24:53.455489
 
982,141,asdf1234asdf,135,Asdf,"",user_closed_pull_request:40,2012-09-07 21:24:53.467808
 
983,3,demo,68,aaa-project,"",user_commented_revision:bc829c34912709c7d129e5dae9a3e5ff46e77fc7,2012-09-07 22:54:29.053992
 
984,3,demo,189,fork-_01_jdj,"",started_following_repo,2012-09-07 22:55:46.169783
 
985,3,demo,170,_01_jdj,"",user_forked_repo:fork-_01_jdj,2012-09-07 22:55:46.191342
 
986,3,demo,189,fork-_01_jdj,"",user_created_fork:fork-_01_jdj,2012-09-07 22:55:46.209143
 
987,2,admin,190,rhodecode,"",started_following_repo,2012-09-08 01:07:09.881091
 
988,2,admin,190,rhodecode,"",admin_created_repo,2012-09-08 01:07:09.895097
 
987,2,admin,190,xxx,"",started_following_repo,2012-09-08 01:07:09.881091
 
988,2,admin,190,xxx,"",admin_created_repo,2012-09-08 01:07:09.895097
 
989,3,demo,34,a,"",user_commented_revision:332932afc11a2c6308d44e75f8b4ac7643093fa7,2012-09-08 08:57:27.586796
 
990,3,demo,191,kekeke,"",started_following_repo,2012-09-08 11:22:58.159504
 
991,3,demo,191,kekeke,"",user_created_repo,2012-09-08 11:22:58.175212
 
992,3,demo,191,kekeke,"",push_local:40926265e8964e7b71381c9c9e1d3c4dbdd158cc,2012-09-08 11:23:11.019021
 
993,3,demo,191,kekeke,"",user_commented_revision:40926265e8964e7b71381c9c9e1d3c4dbdd158cc,2012-09-08 11:23:26.28488
 
994,3,demo,192,fork-kekeke,"",started_following_repo,2012-09-08 11:23:53.101414
 
995,3,demo,191,kekeke,"",user_forked_repo:fork-kekeke,2012-09-08 11:23:53.115395
 
996,3,demo,192,fork-kekeke,"",user_created_fork:fork-kekeke,2012-09-08 11:23:53.129381
 
997,3,demo,192,fork-kekeke,"",push_local:f6c6170cb0cd27fd21d4a8f4ae477bb86ee67e6e,2012-09-08 11:24:25.629176
 
998,3,demo,192,fork-kekeke,"",user_commented_revision:f6c6170cb0cd27fd21d4a8f4ae477bb86ee67e6e,2012-09-08 11:24:36.698761
 
999,3,demo,192,fork-kekeke,"",user_commented_revision:f6c6170cb0cd27fd21d4a8f4ae477bb86ee67e6e,2012-09-08 11:26:01.605011
 
1000,3,demo,193,swamp,"",started_following_repo,2012-09-08 11:27:28.069118
 
@@ -1699,25 +1699,25 @@ user_log_id,user_id,username,repository_
 
1760,3,demo,174,releases/cruel-test-2,"",user_forked_repo:fork-cruel-test-2,2012-10-23 23:49:23.85229
 
1761,3,demo,336,fork-cruel-test-2,"",user_created_fork:fork-cruel-test-2,2012-10-23 23:49:23.867582
 
1762,3,demo,337,why-testing,"",started_following_repo,2012-10-23 23:53:03.878941
 
1763,3,demo,337,why-testing,"",user_created_repo,2012-10-23 23:53:03.893321
 
1764,3,demo,338,temp11,"",started_following_repo,2012-10-24 10:43:46.379754
 
1765,3,demo,338,temp11,"",user_created_repo,2012-10-24 10:43:46.391127
 
1766,3,demo,339,test123,"",started_following_repo,2012-10-24 14:10:41.927001
 
1767,3,demo,339,test123,"",user_created_repo,2012-10-24 14:10:41.936239
 
1768,3,demo,339,releases/test123,"",user_updated_repo,2012-10-24 14:10:57.739304
 
1769,2,admin,339,releases/test123,146.48.87.66,push:87e9dcd8d3e375c218fdb747da52dc1551a93dc7,2012-10-24 14:12:02.63513
 
1770,292,Airframe,340,Testtestac,"",started_following_repo,2012-10-24 17:09:26.37836
 
1771,292,Airframe,340,Testtestac,"",user_created_repo,2012-10-24 17:09:26.387917
 
1772,293,imbehind,190,rhodecode,"",user_commented_revision:008d9c6f7c92636aaeda6f182bffecac6a464dd3,2012-10-24 20:38:59.535098
 
1772,293,imbehind,190,xxx,"",user_commented_revision:008d9c6f7c92636aaeda6f182bffecac6a464dd3,2012-10-24 20:38:59.535098
 
1773,3,demo,341,MicTest,"",started_following_repo,2012-10-24 20:59:34.176289
 
1774,3,demo,341,MicTest,"",user_created_repo,2012-10-24 20:59:34.186308
 
1775,3,demo,341,MicTest,"",push_local:327bf84d0d633a66f0c7ff4533de2415c9ff5a88,2012-10-24 21:00:28.379598
 
1776,295,mhassanzadeh,342,ttest,"",started_following_repo,2012-10-25 10:50:06.001658
 
1777,295,mhassanzadeh,342,ttest,"",user_created_repo,2012-10-25 10:50:06.011192
 
1807,306,foobar,,foobar,"",user_forked_repo:fork-foobar,2012-10-30 05:39:47.942232
 
1809,306,foobar,,foobar,24.67.50.255,push:0e3a7dcdd90bdb2a1f6dbe85e7b574e4f6304207,2012-10-30 05:50:43.083487
 
1781,3,demo,,fork-rawr,"",user_deleted_repo,2012-10-25 15:14:56.164313
 
1782,3,demo,343,test_git_repo,"",started_following_repo,2012-10-26 13:31:41.642802
 
1783,3,demo,343,test_git_repo,"",user_created_repo,2012-10-26 13:31:41.653854
 
1784,2,admin,99,another-fork-to-check-code-review,"",user_commented_revision:d5422faf648cc589425cd3b0dbf1f6dbf93036a0,2012-10-27 15:38:54.924143
 
1785,3,demo,344,sadfasdf,"",started_following_repo,2012-10-28 11:41:22.491275
kallithea/tests/functional/test_admin.py
Show inline comments
 
@@ -53,31 +53,31 @@ class TestAdminController(TestController
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index'))
 
        response.mustcontain('Admin journal')
 

	
 
    def test_filter_all_entries(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',))
 
        response.mustcontain('2034 entries')
 

	
 
    def test_filter_journal_filter_exact_match_on_repository(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:rhodecode'))
 
                                    filter='repository:xxx'))
 
        response.mustcontain('3 entries')
 

	
 
    def test_filter_journal_filter_exact_match_on_repository_CamelCase(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:RhodeCode'))
 
                                    filter='repository:XxX'))
 
        response.mustcontain('3 entries')
 

	
 
    def test_filter_journal_filter_wildcard_on_repository(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:*test*'))
 
        response.mustcontain('862 entries')
 

	
 
    def test_filter_journal_filter_prefix_on_repository(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:test*'))
 
@@ -89,25 +89,25 @@ class TestAdminController(TestController
 
                                    filter='repository:Test*'))
 
        response.mustcontain('257 entries')
 

	
 
    def test_filter_journal_filter_prefix_on_repository_and_user(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:test* AND username:demo'))
 
        response.mustcontain('130 entries')
 

	
 
    def test_filter_journal_filter_prefix_on_repository_or_other_repo(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:test* OR repository:rhodecode'))
 
                                    filter='repository:test* OR repository:xxx'))
 
        response.mustcontain('260 entries')  # 257 + 3
 

	
 
    def test_filter_journal_filter_exact_match_on_username(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='username:demo'))
 
        response.mustcontain('1087 entries')
 

	
 
    def test_filter_journal_filter_exact_match_on_username_camelCase(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='username:DemO'))
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -8,25 +8,25 @@
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.tests.test_scm_operations
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Test suite for making push/pull operations.
 
Run using after doing paster serve test.ini::
 
 RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests kallithea/tests/other/test_vcs_operations.py
 
 KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests kallithea/tests/other/test_vcs_operations.py
 

	
 
You must have git > 1.8.1 for tests to work fine
 

	
 
:created_on: Dec 30, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH.
 
:license: GPLv3, see LICENSE for more details.
 

	
 
"""
 

	
 
import tempfile
 
import time
kallithea/tests/scripts/test_crawler.py
Show inline comments
 
@@ -53,32 +53,32 @@ BASE_URI = '%s:%s/' % (HOST, PORT)
 
if len(sys.argv) == 2:
 
    BASE_URI = sys.argv[1]
 

	
 
if not BASE_URI.endswith('/'):
 
    BASE_URI += '/'
 

	
 
print 'Crawling @ %s' % BASE_URI
 
BASE_URI += '%s'
 
PROJECT_PATH = jn('/', 'home', 'marcink', 'repos')
 
PROJECTS = [
 
    #'linux-magx-pbranch',
 
    'CPython',
 
    'rhodecode_tip',
 
    'kallithea',
 
]
 

	
 

	
 
cj = cookielib.FileCookieJar('/tmp/rc_test_cookie.txt')
 
o = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
 
o.addheaders = [
 
    ('User-agent', 'rhodecode-crawler'),
 
    ('User-agent', 'kallithea-crawler'),
 
    ('Accept-Language', 'en - us, en;q = 0.5')
 
]
 

	
 
urllib2.install_opener(o)
 

	
 

	
 
def _get_repo(proj):
 
    if isinstance(proj, basestring):
 
        repo = vcs.get_repo(jn(PROJECT_PATH, proj))
 
        proj = proj
 
    else:
 
        repo = proj
test.ini
Show inline comments
 
@@ -379,27 +379,27 @@ sentry.exclude_paths =
 
set debug = false
 

	
 
##################################
 
###       LOGVIEW CONFIG       ###
 
##################################
 
logview.sqlalchemy = #faa
 
logview.pylons.templating = #bfb
 
logview.pylons.util = #eee
 

	
 
#########################################################
 
### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG    ###
 
#########################################################
 
sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite
 
#sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test
 
#sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test
 
sqlalchemy.db1.url = sqlite:///%(here)s/kallithea_test.sqlite
 
#sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/kallithea_test
 
#sqlalchemy.db1.url = mysql://root:qwe@localhost/kallithea_test
 
sqlalchemy.db1.echo = false
 
sqlalchemy.db1.pool_recycle = 3600
 
sqlalchemy.db1.convert_unicode = true
 

	
 
################################
 
### LOGGING CONFIGURATION   ####
 
################################
 
[loggers]
 
keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
 

	
 
[handlers]
 
keys = console, console_sql
tox.ini
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)