Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first nimbusrest client test working now.

  • Loading branch information...
commit 5474ec66ecf9b3c6b7306fad27f4642d3dde1b30 1 parent 44477cd
@clemesha-ooi clemesha-ooi authored
View
5 web/src/python/nimbusrest/admin/connection.py
@@ -40,9 +40,8 @@ def add_user(self, user):
udict = {'dn' : user.dn}
- resp = self.post_json('users/', udict)
- print 'resp is None --> ', resp, udict
- return self._user_from_data(resp)
+ u = self.post_json('users/', udict)
+ return self._user_from_data(u)
def get_user(self, user_id):
"""
View
5 web/src/python/nimbusrest/tests.py
@@ -10,15 +10,14 @@ class TestNimbusRestClient(unittest.TestCase):
def setUp(self):
self.user = FakeUser()
- self.uri = "http://localhost:4443/admin/"
+ self.uri = "https://localhost:4443/admin"
self.key = "testadmin"
self.secret = "secret"
self.conn = AdminConnection(self.uri, self.key, self.secret)
def test_add_user(self):
resp = self.conn.add_user(self.user)
- print resp
- self.assertEquals(1, 1)
+ self.assertEquals(resp.dn, "test_dn")
if __name__ == '__main__':
Please sign in to comment.
Something went wrong with that request. Please try again.