Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename delete user authenticator to delete authenticator #25

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified authsignal/__pycache__/client.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion authsignal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def delete_user(self, user_id):
except requests.exceptions.RequestException as e:
raise ApiException(str(e), path) from e

def delete_user_authenticator(self, user_id: str, user_authenticator_id: str) -> Dict[str, Any]:
def delete_authenticator(self, user_id: str, user_authenticator_id: str) -> Dict[str, Any]:
_assert_non_empty_unicode(user_id, 'user_id')
_assert_non_empty_unicode(user_authenticator_id, 'user_authenticator_id')

Expand Down
4 changes: 2 additions & 2 deletions authsignal/client_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_it_returns_success_if_user_id_is_correct(self):
self.assertTrue(response["is_valid"])

@responses.activate
def test_delete_user_authenticator(self):
def test_delete_authenticator(self):
self.authsignal_client = client.Client(api_key='test_api_key')
user_id = 'test_user'
user_authenticator_id = 'test_authenticator'
Expand All @@ -159,7 +159,7 @@ def test_delete_user_authenticator(self):

responses.add(responses.DELETE, expected_url, json={"success": True}, status=200)

response = self.authsignal_client.delete_user_authenticator(user_id, user_authenticator_id)
response = self.authsignal_client.delete_authenticator(user_id, user_authenticator_id)

self.assertEqual(response["success"], True)
self.assertEqual(len(responses.calls), 1)
Expand Down
Loading