title: How can I use the same mock database both while testing normal django views and api views?
body: <p>I have a following problem: I run tests using TestCase and create some data for my database. However, before rendering the template the view uses some API calls and receives information from the real database instead of the mock one. Is there a way to solve this problem? Or maybe I should test the view and the API view separately? Maybe I should create APITestCase? Any help will be appreciated.</p>