-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
853b3ee
commit f014351
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,13 +46,16 @@ def test_waitlist_signup(mock_send_email, client_with_mocks): | |
def test_duplicate_email(mock_send_email, client_with_mocks): | ||
client, mock_db = client_with_mocks | ||
# Simulate an existing user in the database | ||
mock_db.query.return_value.filter.return_value.first.return_value = MagicMock() | ||
existing_user = MagicMock() | ||
mock_db.query.return_value.filter.return_value.first.return_value = existing_user | ||
|
||
response = client.post( | ||
"/api/v1/waitlist/", json={"email": "[email protected]", "full_name": "Test User"} | ||
) | ||
assert response.status_code == 400 | ||
|
||
# Ensure that the response status code reflects the duplicate email case | ||
assert response.status_code == 400 | ||
|
||
def test_invalid_email(mock_send_email, client_with_mocks): | ||
client, _ = client_with_mocks | ||
response = client.post( | ||
|