Skip to content

fix(tests): assert username key on profile response (#6)#84

Open
SAY-5 wants to merge 1 commit into
anxkhn:mainfrom
SAY-5:fix/issue-6-profile-username-key
Open

fix(tests): assert username key on profile response (#6)#84
SAY-5 wants to merge 1 commit into
anxkhn:mainfrom
SAY-5:fix/issue-6-profile-username-key

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 30, 2026

Fixes #6. tests/test_profile.py::test_create_profile:16 asserted response.json()["name"] == "alice", but the API returns the request key under username (consistent with the next test test_get_profile:26 which already uses ["username"]). The KeyError: 'name' was causing the test to fail.

One-character key fix: "name""username".

Test plan

  • pytest tests/test_profile.py -v, 3/3 pass

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@SAY-5 SAY-5 requested a review from anxkhn as a code owner April 30, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test checks wrong key 'name' instead of 'username' in profile response

1 participant