incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [29/50] git commit: [#3154] ticket:408 refactored export tests
Date Mon, 26 Aug 2013 14:01:08 GMT
[#3154]  ticket:408 refactored export tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cf72c2ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cf72c2ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cf72c2ef

Branch: refs/heads/tv/6595
Commit: cf72c2efa152ebbd24503e8da22447c690d83b1b
Parents: cfb95ae
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Mon Aug 12 14:23:27 2013 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Aug 22 20:04:44 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_admin.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cf72c2ef/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index 6d17263..4fd0d19 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -806,12 +806,11 @@ class TestExport(TestController):
         assert_in('Wiki2</label> <a href="/p/test/wiki2/">/p/test/wiki2/</a>',
r)
         assert_not_in('Search</label> <a href="/p/test/search/">/p/test/search/</a>',
r)
 
-    @patch('allura.ext.search.search_main.SearchApp.exportable')
-    def test_export_page_contains_hidden_tools(self, search_app):
-        project = M.Project.query.get(shortname='test')
-        tools = [t.options.mount_point
-                 for t in AdminApp.exportable_tools_for(project)]
-        assert_equals(tools, [u'search', u'wiki', u'wiki2'])
+    def test_export_page_contains_hidden_tools(self):
+        with patch('allura.ext.search.search_main.SearchApp.exportable'):
+            project = M.Project.query.get(shortname='test')
+            tools = [t.options.mount_point for t in AdminApp.exportable_tools_for(project)]
+            assert_equals(tools, [u'search', u'wiki', u'wiki2'])
 
     def test_tools_not_selected(self):
         r = self.app.post('/admin/export')
@@ -842,7 +841,6 @@ class TestExport(TestController):
         shutil.rmtree(p.bulk_export_path(), ignore_errors=True)
         os.makedirs(tmpdir)
         r = self.app.post('/admin/export', {'tools': [u'wiki', u'wiki2']})
-        r = self.app.post('/admin/export', {'tools': [u'wiki', u'wiki2']})
         assert_in('info', self.webflash(r))
         assert_equals(export_tasks.bulk_export.post.call_count, 0)
         shutil.rmtree(p.bulk_export_path(), ignore_errors=True)


Mime
View raw message