committed by
GitHub
144 changed files with 434 additions and 434 deletions
@ -34,14 +34,14 @@ def test_create_user(): |
|||||
"/users/", |
"/users/", |
||||
json={"email": "[email protected]", "password": "chimichangas4life"}, |
json={"email": "[email protected]", "password": "chimichangas4life"}, |
||||
) |
) |
||||
assert response.status_code == 200 |
assert response.status_code == 200, response.text |
||||
data = response.json() |
data = response.json() |
||||
assert data["email"] == "[email protected]" |
assert data["email"] == "[email protected]" |
||||
assert "id" in data |
assert "id" in data |
||||
user_id = data["id"] |
user_id = data["id"] |
||||
|
|
||||
response = client.get(f"/users/{user_id}") |
response = client.get(f"/users/{user_id}") |
||||
assert response.status_code == 200 |
assert response.status_code == 200, response.text |
||||
data = response.json() |
data = response.json() |
||||
assert data["email"] == "[email protected]" |
assert data["email"] == "[email protected]" |
||||
assert data["id"] == user_id |
assert data["id"] == user_id |
||||
|
@ -13,7 +13,7 @@ def test(): |
|||||
if log.is_file(): |
if log.is_file(): |
||||
os.remove(log) # pragma: no cover |
os.remove(log) # pragma: no cover |
||||
response = client.post("/send-notification/[email protected]") |
response = client.post("/send-notification/[email protected]") |
||||
assert response.status_code == 200 |
assert response.status_code == 200, response.text |
||||
assert response.json() == {"message": "Notification sent in the background"} |
assert response.json() == {"message": "Notification sent in the background"} |
||||
with open("./log.txt") as f: |
with open("./log.txt") as f: |
||||
assert "notification for [email protected]: some notification" in f.read() |
assert "notification for [email protected]: some notification" in f.read() |
||||
|
@ -13,7 +13,7 @@ def test(): |
|||||
if log.is_file(): |
if log.is_file(): |
||||
os.remove(log) # pragma: no cover |
os.remove(log) # pragma: no cover |
||||
response = client.post("/send-notification/[email protected]?q=some-query") |
response = client.post("/send-notification/[email protected]?q=some-query") |
||||
assert response.status_code == 200 |
assert response.status_code == 200, response.text |
||||
assert response.json() == {"message": "Message sent"} |
assert response.json() == {"message": "Message sent"} |
||||
with open("./log.txt") as f: |
with open("./log.txt") as f: |
||||
assert "found query: some-query\nmessage to [email protected]" in f.read() |
assert "found query: some-query\nmessage to [email protected]" in f.read() |
||||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue