-
-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: missing None check on alias contacts api
- Loading branch information
1 parent
9646f84
commit c1cd129
Showing
2 changed files
with
15 additions
and
3 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
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 |
---|---|---|
|
@@ -511,6 +511,19 @@ def test_create_contact_route_invalid_alias(flask_client): | |
assert r.status_code == 403 | ||
|
||
|
||
def test_create_contact_route_non_existing_alias(flask_client): | ||
user, api_key = get_new_user_and_api_key() | ||
Session.commit() | ||
|
||
r = flask_client.post( | ||
url_for("api.create_contact_route", alias_id=99999999), | ||
headers={"Authentication": api_key.code}, | ||
json={"contact": "First Last <[email protected]>"}, | ||
) | ||
|
||
assert r.status_code == 403 | ||
|
||
|
||
def test_create_contact_route_free_users(flask_client): | ||
user, api_key = get_new_user_and_api_key() | ||
|
||
|