1
How can I test an api url using nosetest
for example: I have the following api: /api/user
how to ensure that calls at this url are being called?
make a GET
... one POST
passing the parameters on the body
I tried to use the pyresttest
but I couldn’t make the tests work very well
I don’t understand much of the language yet, but you can try reading this link: https://realpython.com/blog/python/testing-third-party-apis-with-mock-servers/ In this case they used
GET
– Maurício Salin
Are you using python3? Flask I don’t really understand if trying to make a request goes well? http://docs.python-requests.org/en/master/ or with urllib: https://docs.python.org/3/library/urllib.request.html#module-urllib.request
– Miguel