You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/08/23 18:58:36 UTC

[36/50] git commit: [#3154] ticket:411 tests for export ini option

[#3154] ticket:411 tests for export ini option


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

Branch: refs/heads/cj/6530
Commit: 50ff51415f4dcdf44c11c292076347fea06cf01c
Parents: 90077d5
Author: Anton Kasyanov <mi...@gmail.com>
Authored: Wed Aug 14 13:22:40 2013 +0300
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Aug 22 20:04:45 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_admin.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/50ff5141/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 9ee232f..bc16982 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -22,6 +22,7 @@ import pkg_resources
 import StringIO
 from contextlib import contextmanager
 
+import tg
 import PIL
 from nose.tools import assert_equals, assert_in, assert_not_in
 from ming.orm.ormsession import ThreadLocalORMSession
@@ -800,6 +801,16 @@ class TestExport(TestController):
                       extra_environ={'username': 'test-user'},
                       status=403)
 
+    def test_ini_option(self):
+        tg.config['bulk_export_enabled'] = 'false'
+        r = self.app.get('/admin/')
+        assert_not_in('Export', r)
+        r = self.app.get('/admin/export').follow()
+        assert_equals(r.request.url, 'http://localhost/admin/')
+        tg.config['bulk_export_enabled'] = 'true'
+        r = self.app.get('/admin/')
+        assert_in('Export', r)
+
     def test_export_page_contains_exportable_tools(self):
         r = self.app.get('/admin/export')
         assert_in('Wiki</label> <a href="/p/test/wiki/">/p/test/wiki/</a>', r)