allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [33/50] git commit: [#3154] ticket:408 refactored export tests
Date Wed, 21 Aug 2013 15:27:15 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/060ecbf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/060ecbf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/060ecbf6

Branch: refs/heads/db/3154b
Commit: 060ecbf6c3f4347b54382e494a77576318e9e5a0
Parents: 0c71f0a
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Mon Aug 12 14:23:27 2013 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Aug 21 15:25:58 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/060ecbf6/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