incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [16/50] git commit: [#3154] ticket:411 tests for export ini option
Date Wed, 28 Aug 2013 14:34:57 GMT
[#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/tv/6526
Commit: 50ff51415f4dcdf44c11c292076347fea06cf01c
Parents: 90077d5
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Wed Aug 14 13:22:40 2013 +0300
Committer: Dave Brondsema <dbrondsema@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)


Mime
View raw message