浏览代码

Merge pull request #30 from buxx/master

Tracim 9 年前
父节点
当前提交
57f15ead6b
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      install/requirements.txt
  2. 3 3
      tracim/tracim/tests/__init__.py

+ 1 - 1
install/requirements.txt 查看文件

@@ -13,7 +13,7 @@ WebOb==1.6.0a0
13 13
 WebTest==1.4.2
14 14
 alembic==0.8.4
15 15
 argparse==1.2.1
16
-backlash==0.0.6
16
+backlash==0.0.7
17 17
 beautifulsoup4==4.3.2
18 18
 cliff==1.8.0
19 19
 cmd2==0.6.7

+ 3 - 3
tracim/tracim/tests/__init__.py 查看文件

@@ -36,7 +36,7 @@ def load_app(name=application_name):
36 36
     return TestApp(loadapp('config:test.ini#%s' % name, relative_to=getcwd()))
37 37
 
38 38
 
39
-def setup_app():
39
+def setup_app(section_name=None):
40 40
     """Setup the application."""
41 41
 
42 42
     engine = config['tg.app_globals'].sa_engine
@@ -48,7 +48,7 @@ def setup_app():
48 48
     cmd = SetupAppCommand(Bunch(options=Bunch(verbose_level=1)), Bunch())
49 49
     logger.debug(setup_app, 'After setup, before run...')
50 50
 
51
-    cmd.run(Bunch(config_file='config:test.ini', section_name=None))
51
+    cmd.run(Bunch(config_file='config:test.ini', section_name=section_name))
52 52
     logger.debug(setup_app, 'After run...')
53 53
 
54 54
 
@@ -183,7 +183,7 @@ class TestController(object):
183 183
         except Exception as e:
184 184
             print('-> err ({})'.format(e.__str__()))
185 185
 
186
-        setup_app()
186
+        setup_app(section_name=self.application_under_test)
187 187
         setup_db()
188 188
 
189 189