Hello,
I’m testing my app using default APITestCase, earlier I’ve been using fixtures but now I’m wondering if is it possible to run command that I’ve already created, it populates DB with needed data (example: python manage.py populate_db). Is it possbile to run before tests just like with fixtures like this:
class MyMainView(APITestCase):
fixtures = [settings.FIXTURE_DIRS[0] / 'dummy_data.json'] # I want to replace THIS with admin-command before tests
def setUp(self) -> None:
super().setUp()
...
Thanks is advance!