incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [22/50] git commit: [#3154] ticket:395 added test for project api
Date Fri, 23 Aug 2013 16:58:22 GMT
[#3154] ticket:395 added test for project api


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

Branch: refs/heads/cj/6530
Commit: 4100da6651ed78290cb6af5016326f6c20a5f76e
Parents: ca4437a
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Thu Jul 25 12:46:11 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Aug 22 20:04:43 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_rest.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4100da66/Allura/allura/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py
index d5ed769..0278666 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -72,9 +72,20 @@ class TestRestHome(TestRestApiBase):
         r = self.api_get('/rest/p/test/')
         assert r.status_int == 200
 
+    def test_project_data(self):
+        r = self.api_get('/rest/p/test/')
+        assert_equal(r.json['name'], 'test')
+        assert_equal(r.json['title'], 'Test Project')
+        assert_equal(r.json['description'], 'You can edit this description in the admin page')
+        assert_equal(len(r.json['developers']), 1)
+        admin_dev = r.json['developers'][0]
+        assert_equal(admin_dev['username'], 'test-admin')
+        assert_equal(admin_dev['name'], 'Test Admin')
+        assert_equal(admin_dev['url'], '/u/test-admin/')
+
     @td.with_tool('test', 'Tickets', 'bugs')
     @td.with_tool('test', 'Tickets', 'private-bugs')
-    def test_project_data(self):
+    def test_project_data_tools(self):
         # Deny anonymous to see 'private-bugs' tool
         role = M.ProjectRole.by_name('*anonymous')._id
         read_permission = M.ACE.allow(role, 'read')


Mime
View raw message