incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [26/50] git commit: [#3154] ticket:395 added test for project api
Date Wed, 21 Aug 2013 15:27:08 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/36ae6b08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/36ae6b08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/36ae6b08

Branch: refs/heads/db/3154b
Commit: 36ae6b083a0b28791a5e4424f28c290fb963bb9c
Parents: a63d2b4
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Thu Jul 25 12:46:11 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Aug 21 15:25:57 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/36ae6b08/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