Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added app/__pycache__/main.cpython-312.pyc
Binary file not shown.
Binary file added app/__pycache__/models.cpython-312.pyc
Binary file not shown.
Binary file added app/__pycache__/store.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 14 additions & 1 deletion tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_create_profile(clean_store):
json={"username": "alice", "bio": "Backend developer", "age": 22},
)
assert response.status_code == 201
assert response.json()["name"] == "alice"
assert response.json()["username"] == "alice"


def test_get_profile(clean_store):
Expand All @@ -29,3 +29,16 @@ def test_get_profile(clean_store):
def test_get_nonexistent_profile(clean_store):
response = client.get("/profile/nobody")
assert response.status_code == 404
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing blank line before function definition. All other test functions in this file (lines 10, 19, 29) have a blank line before them for consistent spacing.

Suggested change
assert response.status_code == 404
assert response.status_code == 404

Copilot uses AI. Check for mistakes.

def test_delete_profile(clean_store):
client.post("/profile", json={"username": "charlie", "bio": "tester"})
response = client.delete("/profile/charlie")
assert response.status_code == 200
assert response.json() == {"deleted": True}
# Verify it is actually gone
get_response = client.get("/profile/charlie")
assert get_response.status_code == 404

def test_delete_nonexistent_profile(clean_store):
response = client.delete("/profile/does_not_exist")
assert response.status_code == 404