refactor RegisterFromInvite to make auth_type required, and update test fixtures

This commit is contained in:
Leo Hemsted
2017-11-13 13:39:31 +00:00
parent 79393c97ef
commit 65ba7e88c8
8 changed files with 61 additions and 98 deletions

View File

@@ -21,12 +21,13 @@ class UserApiClient(NotifyAdminAPIClient):
self.api_key = app.config['ADMIN_CLIENT_SECRET']
self.max_failed_login_count = app.config["MAX_FAILED_LOGIN_COUNT"]
def register_user(self, name, email_address, mobile_number, password):
def register_user(self, name, email_address, mobile_number, password, auth_type):
data = {
"name": name,
"email_address": email_address,
"mobile_number": mobile_number,
"password": password
"password": password,
"auth_type": auth_type
}
user_data = self.post("/user", data)
return User(user_data['data'], max_failed_login_count=self.max_failed_login_count)