Skip to content

Commit

Permalink
test: fix test_send_reset_password_email
Browse files Browse the repository at this point in the history
  • Loading branch information
IamMayankThakur committed Nov 16, 2023
1 parent 3d487b7 commit 42fc65b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/thirdpartyemailpassword/test_email_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from supertokens_python.recipe.thirdpartyemailpassword.interfaces import (
CreateResetPasswordLinkUnknownUserIdError,
SendResetPasswordEmailEmailOkResult,
SendResetPasswordEmailUnknownUserIdError,
)
from supertokens_python.recipe.emailverification.emaildelivery.services import (
SMTPService as EVSMTPService,
Expand Down Expand Up @@ -1120,9 +1121,9 @@ async def test_send_reset_password_email(
resp = await send_reset_password_email("public", user_info["id"])
assert isinstance(resp, SendResetPasswordEmailEmailOkResult)

link = await create_reset_password_link("public", "invalidUserId")
assert isinstance(link, CreateResetPasswordLinkUnknownUserIdError)
link = await send_reset_password_email("public", "invalidUserId")
assert isinstance(link, SendResetPasswordEmailUnknownUserIdError)

with raises(GeneralError) as err:
await create_reset_password_link("invalidTenantId", user_info["id"])
await send_reset_password_email("invalidTenantId", user_info["id"])
assert "status code: 400" in str(err.value)

0 comments on commit 42fc65b

Please sign in to comment.