Open frchalaoux opened 1 year ago
response = client.post(url="/users/", data=json.dumps(data))
response = client.post(url="/users/", data=json.dumps(data))
that fixed it, thanks sir.
If reciving this warning:
DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content. warnings.warn(message, DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Use this: response = client.post("/users/", content=json.dumps(data))
Hi, I'm testing your super apple but got an error with the pytest in "15 : Unit Testing FastAPI Routes". Can you have a look ?
My repository is : https://github.com/frchalaoux/cleanmysurface
cheers, François-Régis
PS: I have exactly the same type of errors when I run pytest with your code !