diff --git a/app/__pycache__/__init__.cpython-312.pyc b/app/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..f52008e Binary files /dev/null and b/app/__pycache__/__init__.cpython-312.pyc differ diff --git a/app/__pycache__/main.cpython-312.pyc b/app/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000..ed16637 Binary files /dev/null and b/app/__pycache__/main.cpython-312.pyc differ diff --git a/app/__pycache__/models.cpython-312.pyc b/app/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000..f54d72c Binary files /dev/null and b/app/__pycache__/models.cpython-312.pyc differ diff --git a/app/__pycache__/store.cpython-312.pyc b/app/__pycache__/store.cpython-312.pyc new file mode 100644 index 0000000..710124b Binary files /dev/null and b/app/__pycache__/store.cpython-312.pyc differ diff --git a/tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc new file mode 100644 index 0000000..d4b9260 Binary files /dev/null and b/tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc differ diff --git a/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc new file mode 100644 index 0000000..62f2c10 Binary files /dev/null and b/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc differ diff --git a/tests/test_profile.py b/tests/test_profile.py index 6bf5e9f..e21e9f4 100644 --- a/tests/test_profile.py +++ b/tests/test_profile.py @@ -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): @@ -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 + +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 \ No newline at end of file