In unit tests i need to load few fixtures this i have done as below
class TestQuestionBankViews(TestCase):
#load this fixtures
fixtures = ['qbank',]
def setUp(self):
login = self.client.login(email="[email protected]",password="welcome")
def test_starting_an_exam_view(self):
candidate = Candidate.objects.get(email="[email protected]")
.......etc
def test_review_view(self):
self.assertTrue(True)
.........
def test_review_view2(self):
self.assertTrue(True)
............
Problem:
These fixtures are loading for every test (i.e) before test_review_view, test_review_view2 etc... as django flush the database after every test
How can i prevent that as it is taking lots of time?
Can't i load in setUP and flush them out while exit but not between every test.
Hope the problem is clear