============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python cachedir: .pytest_cache rootdir: /build/python-django-guardian/src/python-django-guardian-2.4.0, configfile: pytest.ini collecting ... collected 1 item / 15 errors ==================================== ERRORS ==================================== ____________ ERROR collecting guardian/testapp/tests/test_admin.py _____________ guardian/testapp/tests/test_admin.py:9: in from django.contrib.contenttypes.models import ContentType /usr/lib/python3.10/site-packages/django/contrib/contenttypes/models.py:133: in class ContentType(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. _____________ ERROR collecting guardian/testapp/tests/test_conf.py _____________ guardian/testapp/tests/test_conf.py:4: in from guardian.conf import settings as guardian_settings guardian/conf/settings.py:6: in ANONYMOUS_USER_NAME = settings.ANONYMOUS_USER_NAME /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting ANONYMOUS_USER_NAME, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. _____________ ERROR collecting guardian/testapp/tests/test_core.py _____________ guardian/testapp/tests/test_core.py:4: in from guardian.conf import settings as guardian_settings guardian/conf/settings.py:6: in ANONYMOUS_USER_NAME = settings.ANONYMOUS_USER_NAME /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting ANONYMOUS_USER_NAME, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ________ ERROR collecting guardian/testapp/tests/test_custompkmodel.py _________ guardian/testapp/tests/test_custompkmodel.py:2: in from django.contrib.contenttypes.models import ContentType /usr/lib/python3.10/site-packages/django/contrib/contenttypes/models.py:133: in class ContentType(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. __________ ERROR collecting guardian/testapp/tests/test_decorators.py __________ guardian/testapp/tests/test_decorators.py:4: in from django.contrib.auth.models import Group, AnonymousUser /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. __________ ERROR collecting guardian/testapp/tests/test_direct_rel.py __________ guardian/testapp/tests/test_direct_rel.py:2: in from django.contrib.auth.models import Group, Permission /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ____________ ERROR collecting guardian/testapp/tests/test_forms.py _____________ guardian/testapp/tests/test_forms.py:2: in from django.contrib.contenttypes.models import ContentType /usr/lib/python3.10/site-packages/django/contrib/contenttypes/models.py:133: in class ContentType(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. __________ ERROR collecting guardian/testapp/tests/test_management.py __________ guardian/testapp/tests/test_management.py:5: in from django.contrib.sessions.models import Session /usr/lib/python3.10/site-packages/django/contrib/sessions/models.py:1: in from django.contrib.sessions.base_session import ( /usr/lib/python3.10/site-packages/django/contrib/sessions/base_session.py:26: in class AbstractBaseSession(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ___________ ERROR collecting guardian/testapp/tests/test_managers.py ___________ guardian/testapp/tests/test_managers.py:5: in from guardian.managers import UserObjectPermissionManager guardian/managers.py:4: in from guardian.core import ObjectPermissionChecker guardian/core.py:4: in from django.contrib.auth.models import Permission /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ____________ ERROR collecting guardian/testapp/tests/test_mixins.py ____________ guardian/testapp/tests/test_mixins.py:2: in from django.contrib.auth.models import AnonymousUser /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ___________ ERROR collecting guardian/testapp/tests/test_orphans.py ____________ guardian/testapp/tests/test_orphans.py:2: in auth_app = django_apps.get_app_config("auth") /usr/lib/python3.10/site-packages/django/apps/registry.py:154: in get_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ____________ ERROR collecting guardian/testapp/tests/test_other.py _____________ guardian/testapp/tests/test_other.py:5: in from django.contrib.auth.models import AbstractUser /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. __________ ERROR collecting guardian/testapp/tests/test_shortcuts.py ___________ guardian/testapp/tests/test_shortcuts.py:5: in from django.contrib.auth.models import AnonymousUser /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. _____________ ERROR collecting guardian/testapp/tests/test_tags.py _____________ guardian/testapp/tests/test_tags.py:3: in from django.contrib.auth.models import Group, AnonymousUser /usr/lib/python3.10/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.10/site-packages/django/contrib/auth/base_user.py:48: in class AbstractBaseUser(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. ____________ ERROR collecting guardian/testapp/tests/test_utils.py _____________ guardian/testapp/tests/test_utils.py:3: in from django.contrib.contenttypes.models import ContentType /usr/lib/python3.10/site-packages/django/contrib/contenttypes/models.py:133: in class ContentType(models.Model): /usr/lib/python3.10/site-packages/django/db/models/base.py:108: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.10/site-packages/django/apps/registry.py:253: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.10/site-packages/django/apps/registry.py:135: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.10/site-packages/django/conf/__init__.py:82: in __getattr__ self._setup(name) /usr/lib/python3.10/site-packages/django/conf/__init__.py:63: in _setup raise ImproperlyConfigured( E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. =============================== warnings summary =============================== ../../../../usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233 /usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: DJANGO_SETTINGS_MODULE self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ ERROR guardian/testapp/tests/test_admin.py - django.core.exceptions.Improperl... ERROR guardian/testapp/tests/test_conf.py - django.core.exceptions.Improperly... ERROR guardian/testapp/tests/test_core.py - django.core.exceptions.Improperly... ERROR guardian/testapp/tests/test_custompkmodel.py - django.core.exceptions.I... ERROR guardian/testapp/tests/test_decorators.py - django.core.exceptions.Impr... ERROR guardian/testapp/tests/test_direct_rel.py - django.core.exceptions.Impr... ERROR guardian/testapp/tests/test_forms.py - django.core.exceptions.Improperl... ERROR guardian/testapp/tests/test_management.py - django.core.exceptions.Impr... ERROR guardian/testapp/tests/test_managers.py - django.core.exceptions.Improp... ERROR guardian/testapp/tests/test_mixins.py - django.core.exceptions.Improper... ERROR guardian/testapp/tests/test_orphans.py - django.core.exceptions.Imprope... ERROR guardian/testapp/tests/test_other.py - django.core.exceptions.Improperl... ERROR guardian/testapp/tests/test_shortcuts.py - django.core.exceptions.Impro... ERROR guardian/testapp/tests/test_tags.py - django.core.exceptions.Improperly... ERROR guardian/testapp/tests/test_utils.py - django.core.exceptions.Improperl... !!!!!!!!!!!!!!!!!!! Interrupted: 15 errors during collection !!!!!!!!!!!!!!!!!!! ======================== 1 warning, 15 errors in 4.34s ========================= ==> ERROR: A failure occurred in check().  Aborting...