[Answer]-Recommended way of talking to a Django application URL, from within a view of the same application?

1👍

One way to solve this is to mock the response from the URL for the purposes of the tests. I’d suggest using a lightweight mocking library, such as this:

http://blog.moertel.com/posts/2011-11-07-a-flyweight-mocking-helper-for-python.html

See the example code. It’s very similar to your situation. I’ve used both of these in combination with requests and flask, but not django.

Leave a comment