mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
fix syntax
This commit is contained in:
@@ -40,7 +40,7 @@ class UserApiClient(NotifyAdminAPIClient):
|
||||
return self.get("/user/{}".format(user_id))
|
||||
|
||||
def get_user_by_email(self, email_address):
|
||||
user_data = self.post('/user/email', params={'email': email_address})
|
||||
user_data = self.post('/user/email', data={'email': email_address})
|
||||
return user_data['data']
|
||||
|
||||
def get_user_by_email_or_none(self, email_address):
|
||||
|
||||
@@ -33,14 +33,14 @@ def test_client_gets_all_users_for_service(
|
||||
def test_client_uses_correct_find_by_email(mocker, api_user_active):
|
||||
|
||||
expected_url = '/user/email'
|
||||
expected_params = {'email': api_user_active['email_address']}
|
||||
expected_data = {'email': api_user_active['email_address']}
|
||||
|
||||
user_api_client.max_failed_login_count = 1 # doesn't matter for this test
|
||||
mock_post = mocker.patch('app.notify_client.user_api_client.UserApiClient.post')
|
||||
|
||||
user_api_client.get_user_by_email(api_user_active['email_address'])
|
||||
|
||||
mock_post.assert_called_once_with(expected_url, params=expected_params)
|
||||
mock_post.assert_called_once_with(expected_url, data=expected_data)
|
||||
|
||||
|
||||
def test_client_only_updates_allowed_attributes(mocker):
|
||||
|
||||
Reference in New Issue
Block a user