availabili.tf/backend-flask/tests/test_user.py

10 lines
283 B
Python

def test_set_username(client, headers):
client.set_cookie("auth", "test_key")
response = client.post(
"/api/user/username",
json={
"username": "NewUsername"
},
headers=headers)
assert response.json["username"] == "NewUsername"