Beispiel #1
0
def update_user(user_id):
    """Update user."""
    data = _get_request_data()
    return utils.make_json_response(
        200,
        user_api.update_user(
            current_user,
            user_id,
            **data
        )
    )
Beispiel #2
0
 def test_update_admin(self):
     user_objs = user_api.update_user(self.user_object.id,
                                      user=self.user_object,
                                      email=setting.COMPASS_ADMIN_EMAIL,
                                      firstname='a',
                                      lastname='b',
                                      password='******',
                                      is_admin=True,
                                      active=True)
     self.assertEqual(setting.COMPASS_ADMIN_EMAIL, user_objs['email'])
     self.assertEqual(user_objs['firstname'], 'a')
     self.assertEqual(user_objs['lastname'], 'b')
Beispiel #3
0
 def test_update_admin(self):
     user_objs = user_api.update_user(
         self.user_object,
         self.user_object.id,
         email=setting.COMPASS_ADMIN_EMAIL,
         firstname='a',
         lastname='b',
         password='******',
         is_admin=True,
         active=True
     )
     self.assertEqual(setting.COMPASS_ADMIN_EMAIL, user_objs['email'])
     self.assertEqual(user_objs['firstname'], 'a')
     self.assertEqual(user_objs['lastname'], 'b')