Example #1
0
 def test_del_user(self):
     user_api.del_user(
         self.user_object.id,
         user=self.user_object,
     )
     del_user = user_api.list_users(user=self.user_object)
     self.assertEqual([], del_user)
Example #2
0
 def test_del_user(self):
     user_api.del_user(
         self.user_object.id,
         user=self.user_object,
     )
     del_user = user_api.list_users(user=self.user_object)
     self.assertEqual([], del_user)
Example #3
0
 def test_list_users(self):
     user = user_api.list_users(self.user_object)
     self.assertIsNotNone(user)
     result = []
     for item in user:
         result.append(item['email'])
     expects = ['*****@*****.**', setting.COMPASS_ADMIN_EMAIL]
     for expect in expects:
         self.assertIn(expect, result)
Example #4
0
 def test_list_users(self):
     list_users = user_api.list_users(user=self.user_object)
     self.assertIsNotNone(list_users)
     result = []
     for list_user in list_users:
         result.append(list_user['email'])
     expects = ['*****@*****.**', setting.COMPASS_ADMIN_EMAIL]
     for expect in expects:
         self.assertIn(expect, result)
Example #5
0
 def test_list_users(self):
     list_users = user_api.list_users(
         user=self.user_object
     )
     self.assertIsNotNone(list_users)
     result = []
     for list_user in list_users:
         result.append(list_user['email'])
     expects = ['*****@*****.**', setting.COMPASS_ADMIN_EMAIL]
     for expect in expects:
         self.assertIn(expect, result)
Example #6
0
def list_users():
    """list users"""
    data = _get_request_args()
    return utils.make_json_response(
        200, user_api.list_users(current_user, **data)
    )