Skip to content

Commit

Permalink
bugfix: fixed waitlist test
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeSoft007 committed Aug 23, 2024
1 parent 853b3ee commit f014351
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/v1/waitlist/waitlist_email_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f014351

Please sign in to comment.