def test_update_user_name(self): new_user_name = common.unique_str() new_user_email = common.unique_email() self.update_user(self.user['id'], user_name=new_user_name, user_email=new_user_email) r = self.fetch_user(self.user['id']) self.assertTrue(r.json['user']['name'], new_user_name)
def test_create_users_with_duplicate_emails(self): email = common.unique_email() self.create_user(user_email=email) self.create_user(user_email=email, assert_status=409)
def test_update_user_disabled_token(self): self.admin_token = self.disabled_admin_token self.update_user(self.user['id'], user_email=common.unique_email(), assert_status=403)
def test_update_user_bad_request(self): data = '{"user_bad": { "bad": "%s"}}' % (common.unique_email(),) self.post_user_for_update( self.user['id'], assert_status=400, body=data, headers={ "Content-Type": "application/json"})
def test_update_user_bad_request(self): data = '{"user_bad": { "bad": "%s"}}' % (common.unique_email(),) self.put_user(self.user['id'], assert_status=400, body=data, headers={ "Content-Type": "application/json"})
def test_update_user_email(self): new_user_email = common.unique_email() self.update_user(self.user['id'], user_email=new_user_email) r = self.fetch_user(self.user['id']) self.assertTrue(r.json['user']['email'], new_user_email)