Permalink
Browse files

Test for succesful access and secret key creation after User creation.

  • Loading branch information...
1 parent 5474ec6 commit 4018659110adb17017f070aca4a23fbb857274e6 @clemesha-ooi clemesha-ooi committed Feb 12, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 web/src/python/nimbusrest/tests.py
View
6 web/src/python/nimbusrest/tests.py
@@ -15,9 +15,13 @@ def setUp(self):
self.secret = "secret"
self.conn = AdminConnection(self.uri, self.key, self.secret)
- def test_add_user(self):
+ def test_add_user_has_key_secret(self):
resp = self.conn.add_user(self.user)
self.assertEquals(resp.dn, "test_dn")
+ user_id = resp.user_id
+ access_key = self.conn.generate_user_access_key(user_id)
+ self.assertTrue(hasattr(access_key, "secret"))
+ self.assertEquals(access_key.key, user_id)
if __name__ == '__main__':

0 comments on commit 4018659

Please sign in to comment.