diff --git a/bitbake/lib/toaster/pytest.ini b/bitbake/lib/toaster/pytest.ini index f07076b7ea..071c65fcd5 100644 --- a/bitbake/lib/toaster/pytest.ini +++ b/bitbake/lib/toaster/pytest.ini @@ -1,9 +1,5 @@ # -- FILE: pytest.ini (or tox.ini) [pytest] -DJANGO_SETTINGS_MODULE = toastermain.settings_test - -python_files = db/test_*.py commands/test_*.py views/test_*.py browser/test_*.py functional/test_*.py - # --create-db - force re creation of the test database # https://pytest-django.readthedocs.io/en/latest/database.html#create-db-force-re-creation-of-the-test-database @@ -17,3 +13,4 @@ addopts = --create-db --html="Toaster Tests Report.html" --self-contained-html # https://pypi.org/project/pytest-env/ env = TOASTER_BUILDSERVER=1 + DJANGO_SETTINGS_MODULE=toastermain.settings_test diff --git a/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/bitbake/lib/toaster/tests/builds/test_core_image_min.py index 9cdaa15f98..ca388eabe7 100644 --- a/bitbake/lib/toaster/tests/builds/test_core_image_min.py +++ b/bitbake/lib/toaster/tests/builds/test_core_image_min.py @@ -10,6 +10,7 @@ # Ionut Chisanovici, Paul Eggleton and Cristian Iorga import os +import pytest from django.db.models import Q @@ -21,6 +22,7 @@ from orm.models import CustomImagePackage from tests.builds.buildtest import BuildTest +@pytest.mark.django_db(True) class BuildCoreImageMinimal(BuildTest): """Build core-image-minimal and test the results"""