add fixture to populate the test db

This commit is contained in:
Andreas Zweili 2019-06-16 22:09:51 +02:00
parent 23a09231d1
commit 088483e5b9
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import pytest
from django.core.management import call_command
@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
with django_db_blocker.unblock():
call_command('loaddata', 'inventory.yaml')