Skip to content

Commit d1577e1

Browse files
add update_user test
1 parent 0c5d405 commit d1577e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

authsignal/client_tests.py

+13
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ def test_get_action(self):
8686
self.assertEqual(response["state"], "ALLOW")
8787
self.assertEqual(response["state_updated_at"], "2022-07-25T03:19:00.316Z")
8888

89+
@responses.activate
90+
def test_update_user(self):
91+
user_id = "1234"
92+
data = {"email": "[email protected]"}
93+
expected_response = {"email": "[email protected]"}
94+
95+
responses.add(responses.POST, f"{base_url}/users/{user_id}",
96+
json=expected_response, status=200)
97+
98+
response = self.authsignal_client.update_user(user_id=user_id, data=data)
99+
100+
self.assertEqual(response["email"], "[email protected]")
101+
89102
class ValidateChallenge(unittest.TestCase):
90103
def setUp(self):
91104
self.api_key='SECRET'

0 commit comments

Comments
 (0)