Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
marcink
- Sat, 11 Sep 2010 01:42:57
Show More
pylons_app/tests/vcs_test.tar.gz
0
created
644
binary
0
0
1
NO CONTENT: new file 100644, binary diff hidden
pylons_app/config/environment.py
0
+2
-2
@@
-49,10
+49,10
b' def load_environment(global_conf, app_co'
49
49
50
50
#sets the c attribute access when don't existing attribute are accessed
51
51
config [ 'pylons.strict_tmpl_context' ] = True
52
52
test = os . path . split ( config [ '__file__' ])[ - 1 ] == 'tests.ini'
53
53
#MULTIPLE DB configs
54
54
# Setup the SQLAlchemy database engine
55
if config [ 'debug' ] and os .path.split(config['__file__'])[-1] != 'tests.ini':
55
if config [ 'debug' ] and n ot test :
56
56
#use query time debugging.
57
57
from pylons_app.lib.timerproxy import TimerProxy
58
58
sa_engine_db1 = engine_from_config ( config , 'sqlalchemy.db1.' ,
pylons_app/controllers/changeset.py
0
+3
-1
@@
-88,6
+88,7
b' class ChangesetController(BaseController'
88
88
def raw_changeset ( self , revision ):
89
89
90
90
hg_model = HgModel ()
91
method = request . GET . get ( 'diff' , 'show' )
91
92
try :
92
93
c . changeset = hg_model . get_repo ( c . repo_name ) . get_changeset ( revision )
93
94
except RepositoryError :
@@
-125,7
+126,8
b' class ChangesetController(BaseController'
125
126
c . changes . append (( 'changed' , node , diff , cs1 , cs2 ))
126
127
127
128
response . content_type = 'text/plain'
128
129
if method == 'download' :
130
response . content_disposition = 'attachment; filename= %s .patch' % revision
129
131
parent = True if len ( c . changeset . parents ) > 0 else False
130
132
c . parent_tmpl = 'Parent %s ' % c . changeset . parents [ 0 ] . _hex if parent else ''
131
133
pylons_app/templates/changeset/changeset.html
0
+12
0
@@
-23,6
+23,18
b''
23
23
${self.breadcrumbs()}
24
24
</ div >
25
25
< div class = "table" >
26
< div id = "body" class = "diffblock" >
27
< div class = "code-header" >
28
< div >
29
${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id}
30
» < span > ${h.link_to(_('raw diff'),
31
h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))} </ span >
32
» < span > ${h.link_to(_('download diff'),
33
h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))} </ span >
34
</ div >
35
</ div >
36
</ div >
37
26
38
< div id = "changeset_content" >
27
39
< div class = "container" >
28
40
< div class = "left" >
pylons_app/templates/changeset/raw_changeset.html
0
+1
-1
@@
-1,5
+1,5
b''
1
1
# HG changeset patch
2
# User ${c.changeset.author}
2
# User ${c.changeset.author|n }
3
3
# Date ${"%d %d" % c.changeset._ctx.date()}
4
4
# Node ID ${c.changeset._hex}
5
5
# ${c.parent_tmpl}
pylons_app/tests/__init__.py
0
0
-1
@@
-31,7
+31,6
b' class TestController(TestCase):'
31
31
wsgiapp = pylons . test . pylonsapp
32
32
config = wsgiapp . config
33
33
self . app = TestApp ( wsgiapp )
34
self . session = session
35
34
url . _push_object ( URLGenerator ( config [ 'routes.map' ], environ ))
36
35
self . sa = meta . Session
37
36
TestCase . __init__ ( self , * args , ** kwargs )
pylons_app/tests/functional/test_search.py
0
+16
-2
@@
-1,4
+1,7
b''
1
1
from pylons_app.tests import *
2
from pylons_app.lib.indexers import IDX_LOCATION
3
import os
4
from nose.plugins.skip import SkipTest
2
5
3
6
class TestSearchController ( TestController ):
4
7
@@
-10,6
+13,17
b' class TestSearchController(TestControlle'
10
13
# Test response...
11
14
12
15
def test_empty_search ( self ):
16
17
if os . path . isdir ( IDX_LOCATION ):
18
raise SkipTest ( 'skipped due to existing index' )
19
else :
20
self . log_user ()
21
response = self . app . get ( url ( controller = 'search' , action = 'index' ),{ 'q' : 'vcs_test' })
22
assert 'There is no index to search in. Please run whoosh indexer' in response . body , 'No error message about empty index'
23
24
def test_normal_search ( self ):
13
25
self . log_user ()
14
response = self . app . get ( url ( controller = 'search' , action = 'index' ),{ 'q' : 'vcs_test' })
15
assert 'There is no index to search in. Please run whoosh indexer' in response . body , 'No error message about empty index'
No newline at end of file
26
response = self . app . get ( url ( controller = 'search' , action = 'index' ),{ 'q' : 'def+repo ' })
27
print response . body
28
assert '9 results' in response . body , 'no message about proper search results'
29
pylons_app/websetup.py
0
+6
-3
@@
-8,7
+8,8
b' from time import mktime'
8
8
import logging
9
9
import os
10
10
import sys
11
import shutil
11
import tarf ile
12
12
13
log = logging . getLogger ( __name__ )
13
14
14
15
ROOT = dn ( dn ( os . path . realpath ( __file__ )))
@@
-28,8
+29,10
b' def setup_app(command, conf, vars):'
28
29
29
30
if not os . path . isdir ( REPO_TEST_PATH ):
30
31
os . mkdir ( REPO_TEST_PATH )
31
from_ = '/home/marcink/workspace-python/vcs'
32
shutil . copytree ( from_ , os . path . join ( REPO_TEST_PATH , 'vcs_test' ))
32
cur_dir = dn ( os . path . abspath ( __file__ ))
33
tar = tarfile . open ( jn ( cur_dir , 'tests' , "vcs_test.tar.gz" ))
34
tar . extractall ( REPO_TEST_PATH )
35
tar . close ()
33
36
34
37
tests = True
35
38
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages