incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [16/36] git commit: [#5502] ticket:505 Fix test
Date Fri, 20 Dec 2013 18:50:42 GMT
[#5502] ticket:505 Fix test

Failing due to change installable from class attribute to property.
App.installable returns property object, which always evaluates to True,
must access installable property always through App's instance.


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

Branch: refs/heads/db/6388
Commit: db19ef7a47a33ec71e79612d8cc28d40fb5638e3
Parents: 343ebc4
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Dec 18 13:28:51 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Dec 18 20:38:59 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_admin.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db19ef7a/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 d97f535..54bdf85 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -270,11 +270,17 @@ class TestProjectAdmin(TestController):
         BUILTIN_APPS = ['activity', 'blog', 'discussion', 'git', 'link',
                 'shorturl', 'svn', 'tickets', 'userstats', 'wiki']
         self.app.get('/admin/')
+        project = M.Project.query.get(shortname='test')
         for i, ep in enumerate(pkg_resources.iter_entry_points('allura')):
-            app = ep.load()
+            App = ep.load()
+            tool = ep.name
+            cfg = M.AppConfig(
+                    project_id=project._id,
+                    tool_name=tool,
+                    options={'mount_point': '', 'mount_label': ''})
+            app = App(project, cfg)
             if not app.installable or ep.name.lower() not in BUILTIN_APPS:
                 continue
-            tool = ep.name
             with audits('install tool test-%d' % i):
                 self.app.post('/admin/update_mounts', params={
                         'new.install':'install',


Mime
View raw message