incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [38/50] git commit: [#3154] ticket:411 tests for export ini option
Date Wed, 21 Aug 2013 20:12:54 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/7b477976
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7b477976
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7b477976

Branch: refs/heads/db/3154b
Commit: 7b477976d8bcd1836fb4209f391635c3c511f044
Parents: 06f7164
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Wed Aug 14 13:22:40 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Aug 21 18:12:27 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/7b477976/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