Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django pytest how to load data

@pytest.fixture(autouse=True)
def setup(self, db):
    call_command('loaddata', './apps/accounts/fixtures/accounts.json')
    call_command('loaddata', './apps/activation/fixtures/activation.json')
    call_command('loaddata', './apps/questionnaire/fixtures/questionnaire.json')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #pytest #load #data
ADD COMMENT
Topic
Name
2+1 =