I have a project that includes a Django web service exposing a rest API (using DRF) and an python application that issues requests (using urllib.request) to that server. They are both in the same github repo and share a set of Travis-CI jobs, where some jobs test the Django site and other jobs test the python application.
After writing several tests for each individually, I would like to create some tests that will trigger the entire flow, starting somewhere in the application code then issue a request that will directed to the django app which will in turn return a response that will be processed by the application.
I believe I need some kind of a hook somewhere along my request.Request or opener.Open functions that normally send the HTTP request, and I'm certain this has been done before. I couldn't find anything on Django's documentation for that.
Aucun commentaire:
Enregistrer un commentaire