Laravel's Http:fake()
method allows you to instruct the HTTP client to return stubbed / dummy responses when requests are made. How can I achieve the same using Django Rest Framework APIClient
in tests?
I tried requests_mock
but it didn't yield the result I was expecting. It only mocks requests made within test function and not anywhere else within the application or project you're testing.