diff options
-rw-r--r-- | bitbake/lib/toaster/pytest.ini | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/tests/builds/test_core_image_min.py | 2 |
2 files changed, 3 insertions, 4 deletions
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 @@ | |||
1 | # -- FILE: pytest.ini (or tox.ini) | 1 | # -- FILE: pytest.ini (or tox.ini) |
2 | [pytest] | 2 | [pytest] |
3 | DJANGO_SETTINGS_MODULE = toastermain.settings_test | ||
4 | |||
5 | python_files = db/test_*.py commands/test_*.py views/test_*.py browser/test_*.py functional/test_*.py | ||
6 | |||
7 | # --create-db - force re creation of the test database | 3 | # --create-db - force re creation of the test database |
8 | # https://pytest-django.readthedocs.io/en/latest/database.html#create-db-force-re-creation-of-the-test-database | 4 | # https://pytest-django.readthedocs.io/en/latest/database.html#create-db-force-re-creation-of-the-test-database |
9 | 5 | ||
@@ -17,3 +13,4 @@ addopts = --create-db --html="Toaster Tests Report.html" --self-contained-html | |||
17 | # https://pypi.org/project/pytest-env/ | 13 | # https://pypi.org/project/pytest-env/ |
18 | env = | 14 | env = |
19 | TOASTER_BUILDSERVER=1 | 15 | TOASTER_BUILDSERVER=1 |
16 | 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 @@ | |||
10 | # Ionut Chisanovici, Paul Eggleton and Cristian Iorga | 10 | # Ionut Chisanovici, Paul Eggleton and Cristian Iorga |
11 | 11 | ||
12 | import os | 12 | import os |
13 | import pytest | ||
13 | 14 | ||
14 | from django.db.models import Q | 15 | from django.db.models import Q |
15 | 16 | ||
@@ -21,6 +22,7 @@ from orm.models import CustomImagePackage | |||
21 | from tests.builds.buildtest import BuildTest | 22 | from tests.builds.buildtest import BuildTest |
22 | 23 | ||
23 | 24 | ||
25 | @pytest.mark.django_db(True) | ||
24 | class BuildCoreImageMinimal(BuildTest): | 26 | class BuildCoreImageMinimal(BuildTest): |
25 | """Build core-image-minimal and test the results""" | 27 | """Build core-image-minimal and test the results""" |
26 | 28 | ||