You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/08/21 22:12:38 UTC

[22/50] git commit: [#3154] ticket:395 added test for project api

[#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/a5ee64ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a5ee64ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a5ee64ec

Branch: refs/heads/db/3154b
Commit: a5ee64ec08aa77948e3c3cc2c0cae9ac98c00c44
Parents: ba3de6a
Author: Anton Kasyanov <mi...@gmail.com>
Authored: Thu Jul 25 12:46:11 2013 +0300
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Aug 21 18:12:25 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/a5ee64ec/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')