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/22 23:53:51 UTC
[25/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/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/master
Commit: 4100da6651ed78290cb6af5016326f6c20a5f76e
Parents: ca4437a
Author: Anton Kasyanov <mi...@gmail.com>
Authored: Thu Jul 25 12:46:11 2013 +0300
Committer: Dave Brondsema <db...@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')