allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [5/9] git commit: [#7292] ticket:568 JSON Profile full test
Date Mon, 21 Apr 2014 17:24:04 GMT
[#7292] ticket:568 JSON Profile full test


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

Branch: refs/heads/master
Commit: 952ce225333e7fc3bd61924d7590b1bc9a4a5feb
Parents: d541bdc
Author: Aleksey 'LXj' Alekseyev <gotletter@gmail.com>
Authored: Tue Apr 8 16:10:03 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Apr 21 17:21:57 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_rest.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/952ce225/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 0537bd7..0d6954d 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -292,7 +292,20 @@ class TestDoap(TestRestApiBase):
 
 
 class TestUserProfile(TestRestApiBase):
+    @td.with_user_project('test-admin')
     def test_profile_data(self):
-        r = self.app.get('/rest/u/test-admin/')
+        r = self.app.get('/rest/u/test-admin/profile/')
         assert_equal(r.content_type, 'application/json')
-        assert False  # finish test
+        json = r.json
+        assert_equal(json['username'], 'test-admin')
+        assert_in('availability', json)
+        assert_in('joined', json)
+        assert_in('localization', json)
+        assert_in('projects', json)
+        assert_in('sex', json)
+        assert_in('skills', json)
+        assert_in('skypeaccount', json)
+        assert_in('socialnetworks', json)
+        assert_in('telnumbers', json)
+        assert_in('tools', json)
+        assert_in('webpages', json)


Mime
View raw message