lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.52k stars 452 forks source link

1.3.0: pytest dails in few units #616

Open kloczek opened 8 months ago

kloczek commented 8 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output: ```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-authlib-1.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-authlib-1.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/authlib-1.3.0 configfile: tox.ini plugins: anyio-4.2.0, asyncio-0.23.3 asyncio: mode=auto collected 617 items / 10 errors ========================================================================================== ERRORS =========================================================================================== ________________________________________________________________ ERROR collecting tests/django/test_oauth1/test_authorize.py ________________________________________________________________ tests/django/test_oauth1/test_authorize.py:4: in from .models import User, Client tests/django/test_oauth1/models.py:3: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth1/test_resource_protector.py ____________________________________________________________ tests/django/test_oauth1/test_resource_protector.py:10: in from .models import User, Client, TokenCredential tests/django/test_oauth1/models.py:3: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth1/test_token_credentials.py ____________________________________________________________ tests/django/test_oauth1/test_token_credentials.py:6: in from .models import User, Client tests/django/test_oauth1/models.py:3: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_authorization_code_grant.py _________________________________________________________ tests/django/test_oauth2/test_authorization_code_grant.py:5: in from .models import User, Client, OAuth2Code tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_client_credentials_grant.py _________________________________________________________ tests/django/test_oauth2/test_client_credentials_grant.py:3: in from .oauth2_server import TestCase tests/django/test_oauth2/oauth2_server.py:6: in from .models import Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_implicit_grant.py ______________________________________________________________ tests/django/test_oauth2/test_implicit_grant.py:3: in from .oauth2_server import TestCase tests/django/test_oauth2/oauth2_server.py:6: in from .models import Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_password_grant.py ______________________________________________________________ tests/django/test_oauth2/test_password_grant.py:6: in from .oauth2_server import TestCase tests/django/test_oauth2/oauth2_server.py:6: in from .models import Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_refresh_token.py ______________________________________________________________ tests/django/test_oauth2/test_refresh_token.py:6: in from .models import User, Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_resource_protector.py ____________________________________________________________ tests/django/test_oauth2/test_resource_protector.py:4: in from .models import User, Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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 tests/django/test_oauth2/test_revocation_endpoint.py ___________________________________________________________ tests/django/test_oauth2/test_revocation_endpoint.py:3: in from .oauth2_server import TestCase tests/django/test_oauth2/oauth2_server.py:6: in from .models import Client, OAuth2Token tests/django/test_oauth2/models.py:10: in from django.contrib.auth.models import User /usr/lib/python3.8/site-packages/django/contrib/auth/models.py:3: in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager /usr/lib/python3.8/site-packages/django/contrib/auth/base_user.py:57: in class AbstractBaseUser(models.Model): /usr/lib/python3.8/site-packages/django/db/models/base.py:129: in __new__ app_config = apps.get_containing_app_config(module) /usr/lib/python3.8/site-packages/django/apps/registry.py:260: in get_containing_app_config self.check_apps_ready() /usr/lib/python3.8/site-packages/django/apps/registry.py:137: in check_apps_ready settings.INSTALLED_APPS /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: 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. ================================================================================== short test summary info ================================================================================== ERROR tests/django/test_oauth1/test_authorize.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth1/test_resource_protector.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth1/test_token_credentials.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_authorization_code_grant.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_client_credentials_grant.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_implicit_grant.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_password_grant.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_refresh_token.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_resource_protector.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... ERROR tests/django/test_oauth2/test_revocation_endpoint.py - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE o... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ==================================================================================== 10 errors in 2.47s ===================================================================================== ```

Q: what should I pass in env variables? 🤔

List of installed modules in build env: ```console Package Version ----------------------------- --------- alabaster 0.7.16 anyio 4.2.0 asgiref 3.7.2 Babel 2.14.0 backports.zoneinfo 0.2.1 blinker 1.6.2 build 1.0.3 cachelib 0.10.2 certifi 2023.7.22 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 cppclean 0.13 cryptography 41.0.5 distro 1.8.0 Django 4.2.6 dnf 4.18.2 docutils 0.20.1 exceptiongroup 1.1.3 Flask 3.0.0 Flask-SQLAlchemy 3.0.5 gpg 1.23.2 greenlet 3.0.3 h11 0.14.0 httpcore 1.0.0 httpx 0.25.2 idna 3.6 imagesize 1.4.1 importlib-metadata 7.0.1 iniconfig 2.0.0 installer 0.7.0 itsdangerous 2.1.2 Jinja2 3.1.2 libdnf 0.72.0 MarkupSafe 2.1.3 packaging 23.2 pluggy 1.3.0 ply 3.11 pycparser 2.21 Pygments 2.17.2 pyproject_hooks 1.0.0 pytest 7.4.4 pytest-asyncio 0.23.3 python-dateutil 2.8.2 pytz 2023.3 requests 2.31.0 setuptools 69.0.3 six 1.16.0 sniffio 1.3.0 snowballstemmer 2.2.0 Sphinx 7.1.2 sphinx-copybutton 0.5.2 sphinx_design 0.5.0 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 SQLAlchemy 2.0.25 sqlparse 0.4.4 starlette 0.34.0 tomli 2.0.1 typing_extensions 4.9.0 urllib3 1.26.18 Werkzeug 3.0.1 wheel 0.42.0 zipp 3.17.0 ```

Please let me know if you need more details or want me to perform some diagnostics.

kloczek commented 8 months ago

After add test suite files on which pytest is failing to --ignore list looks like other units are failing with errors

Here is pytest output: ```console + /usr/bin/pytest -ra -m 'not network' --ignore tests/django/test_oauth1/test_authorize.py --ignore tests/django/test_oauth1/test_resource_protector.py --ignore tests/django/test_oauth1/test_token_credentials.py --ignore tests/django/test_oauth2/test_authorization_code_grant.py --ignore tests/django/test_oauth2/test_client_credentials_grant.py --ignore tests/django/test_oauth2/test_implicit_grant.py --ignore tests/django/test_oauth2/test_password_grant.py --ignore tests/django/test_oauth2/test_refresh_token.py --ignore tests/django/test_oauth2/test_resource_protector.py --ignore tests/django/test_oauth2/test_revocation_endpoint.py ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/authlib-1.3.0 configfile: tox.ini plugins: anyio-4.2.0, asyncio-0.23.3 asyncio: mode=auto collected 617 items tests/clients/test_django/test_oauth_client.py EEEEEEEEEEEEE [ 2%] tests/clients/test_flask/test_oauth_client.py .................... [ 5%] tests/clients/test_flask/test_user_mixin.py ..... [ 6%] tests/clients/test_httpx/test_assertion_client.py .. [ 6%] tests/clients/test_httpx/test_async_assertion_client.py .. [ 6%] tests/clients/test_httpx/test_async_oauth1_client.py ....... [ 7%] tests/clients/test_httpx/test_async_oauth2_client.py ......................... [ 11%] tests/clients/test_httpx/test_oauth1_client.py ....... [ 13%] tests/clients/test_httpx/test_oauth2_client.py ...................... [ 16%] tests/clients/test_requests/test_assertion_session.py .. [ 17%] tests/clients/test_requests/test_oauth1_session.py ................ [ 19%] tests/clients/test_requests/test_oauth2_session.py .............................. [ 24%] tests/clients/test_starlette/test_oauth_client.py ............ [ 26%] tests/clients/test_starlette/test_user_mixin.py .... [ 27%] tests/core/test_oauth2/test_rfc6749_misc.py ...... [ 28%] tests/core/test_oauth2/test_rfc7523.py ........................ [ 31%] tests/core/test_oauth2/test_rfc7591.py ...... [ 32%] tests/core/test_oauth2/test_rfc7662.py ...... [ 33%] tests/core/test_oauth2/test_rfc8414.py .......................... [ 38%] tests/core/test_oidc/test_core.py .......... [ 39%] tests/core/test_oidc/test_discovery.py ....................... [ 43%] tests/flask/test_oauth1/test_authorize.py ...... [ 44%] tests/flask/test_oauth1/test_resource_protector.py ........ [ 45%] tests/flask/test_oauth1/test_temporary_credentials.py ................ [ 48%] tests/flask/test_oauth1/test_token_credentials.py ...... [ 49%] tests/flask/test_oauth2/test_authorization_code_grant.py ............ [ 51%] tests/flask/test_oauth2/test_client_configuration_endpoint.py .................. [ 54%] tests/flask/test_oauth2/test_client_credentials_grant.py ..... [ 54%] tests/flask/test_oauth2/test_client_registration_endpoint.py ......... [ 56%] tests/flask/test_oauth2/test_code_challenge.py ............ [ 58%] tests/flask/test_oauth2/test_device_code_grant.py ......... [ 59%] tests/flask/test_oauth2/test_implicit_grant.py ...... [ 60%] tests/flask/test_oauth2/test_introspection_endpoint.py .... [ 61%] tests/flask/test_oauth2/test_jwt_access_token.py ..s........................... [ 66%] tests/flask/test_oauth2/test_jwt_bearer_client_auth.py ....... [ 67%] tests/flask/test_oauth2/test_jwt_bearer_grant.py ...... [ 68%] tests/flask/test_oauth2/test_oauth2_server.py ....... [ 69%] tests/flask/test_oauth2/test_openid_code_grant.py ........ [ 70%] tests/flask/test_oauth2/test_openid_hybrid_grant.py .......... [ 72%] tests/flask/test_oauth2/test_openid_implict_grant.py ........ [ 73%] tests/flask/test_oauth2/test_password_grant.py ........ [ 75%] tests/flask/test_oauth2/test_refresh_token.py .......... [ 76%] tests/flask/test_oauth2/test_revocation_endpoint.py .... [ 77%] tests/jose/test_chacha20.py .FF [ 77%] tests/jose/test_ecdh_1pu.py ........................... [ 82%] tests/jose/test_jwe.py ................................................ [ 89%] tests/jose/test_jwk.py ....................... [ 93%] tests/jose/test_jws.py ................ [ 96%] tests/jose/test_jwt.py ...................... [ 99%] tests/jose/test_rfc8037.py . [100%] ========================================================================================== ERRORS =========================================================================================== __________________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth1_authorize __________________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ___________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth2_access_token_with_post ____________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured __________________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth2_authorize __________________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ___________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth2_authorize_access_denied ___________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured __________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth2_authorize_code_challenge ___________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ___________________________________________________________ ERROR at setup of DjangoOAuthTest.test_oauth2_authorize_code_verifier ___________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured __________________________________________________________________ ERROR at setup of DjangoOAuthTest.test_openid_authorize __________________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured _______________________________________________________________ ERROR at setup of DjangoOAuthTest.test_register_from_settings _______________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ________________________________________________________________ ERROR at setup of DjangoOAuthTest.test_register_remote_app _________________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ______________________________________________________________ ERROR at setup of DjangoOAuthTest.test_register_with_overwrite _______________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured _______________________________________________________________ ERROR at setup of DjangoOAuthTest.test_request_without_token ________________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured _____________________________________________________________ ERROR at setup of DjangoOAuthTest.test_with_fetch_token_in_oauth ______________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ____________________________________________________________ ERROR at setup of DjangoOAuthTest.test_with_fetch_token_in_register ____________________________________________________________ cls = @classmethod def setUpClass(cls): > super().setUpClass() /usr/lib/python3.8/site-packages/django/test/testcases.py:1448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/django/test/testcases.py:325: in setUpClass cls._add_databases_failures() /usr/lib/python3.8/site-packages/django/test/testcases.py:351: in _add_databases_failures cls.databases = cls._validate_databases() /usr/lib/python3.8/site-packages/django/test/testcases.py:333: in _validate_databases if alias not in connections: /usr/lib/python3.8/site-packages/django/utils/connection.py:73: in __iter__ return iter(self.settings) /usr/lib/python3.8/site-packages/django/utils/functional.py:57: in __get__ res = instance.__dict__[self.name] = self.func(instance) /usr/lib/python3.8/site-packages/django/utils/connection.py:45: in settings self._settings = self.configure_settings(self._settings) /usr/lib/python3.8/site-packages/django/db/utils.py:148: in configure_settings databases = super().configure_settings(databases) /usr/lib/python3.8/site-packages/django/utils/connection.py:50: in configure_settings settings = getattr(django_settings, self.settings_name) /usr/lib/python3.8/site-packages/django/conf/__init__.py:102: in __getattr__ self._setup(name) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , name = 'DATABASES' def _setup(self, name=None): """ Load the settings module pointed to by the environment variable. This is used the first time settings are needed, if the user hasn't configured settings manually. """ settings_module = os.environ.get(ENVIRONMENT_VARIABLE) if not settings_module: desc = ("setting %s" % name) if name else "settings" > raise ImproperlyConfigured( "Requested %s, but settings are not configured. " "You must either define the environment variable %s " "or call settings.configure() before accessing settings." % (desc, ENVIRONMENT_VARIABLE) ) E django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. /usr/lib/python3.8/site-packages/django/conf/__init__.py:82: ImproperlyConfigured ========================================================================================= FAILURES ========================================================================================== ______________________________________________________________________________ ChaCha20Test.test_dir_alg_xc20p ______________________________________________________________________________ self = def test_dir_alg_xc20p(self): jwe = JsonWebEncryption() key = OctKey.generate_key(256, is_private=True) protected = {'alg': 'dir', 'enc': 'XC20P'} > data = jwe.serialize_compact(protected, b'hello', key) tests/jose/test_chacha20.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ authlib/jose/rfc7516/jwe.py:80: in serialize_compact enc = self.get_header_enc(protected) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , header = {'alg': 'dir', 'enc': 'XC20P'} def get_header_enc(self, header): if 'enc' not in header: raise MissingEncryptionAlgorithmError() enc = header['enc'] if self._algorithms is not None and enc not in self._algorithms: raise UnsupportedEncryptionAlgorithmError() if enc not in self.ENC_REGISTRY: > raise UnsupportedEncryptionAlgorithmError() E authlib.jose.errors.UnsupportedEncryptionAlgorithmError: unsupported_encryption_algorithm: Unsupported "enc" value in header authlib/jose/rfc7516/jwe.py:678: UnsupportedEncryptionAlgorithmError ___________________________________________________________________ ChaCha20Test.test_xc20p_content_encryption_decryption ___________________________________________________________________ self = def test_xc20p_content_encryption_decryption(self): # https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-xchacha-03#appendix-A.3.1 > enc = JsonWebEncryption.ENC_REGISTRY['XC20P'] E KeyError: 'XC20P' tests/jose/test_chacha20.py:47: KeyError ===================================================================================== warnings summary ====================================================================================== tests/clients/test_flask/test_oauth_client.py::FlaskOAuthTest::test_openid_authorize /home/tkloczko/rpmbuild/BUILD/authlib-1.3.0/authlib/jose/jwk.py:14: AuthlibDeprecationWarning: Please use ``JsonWebKey`` directly. deprecate('Please use ``JsonWebKey`` directly.') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================================================================== short test summary info ================================================================================== SKIPPED [1] tests/flask/test_oauth2/test_jwt_access_token.py:307: unconditional skip ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth1_authorize - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth2_access_token_with_post - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth2_authorize - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth2_authorize_access_denied - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth2_authorize_code_challenge - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_oauth2_authorize_code_verifier - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_openid_authorize - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_register_from_settings - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_register_remote_app - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_register_with_overwrite - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_request_without_token - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_with_fetch_token_in_oauth - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... ERROR tests/clients/test_django/test_oauth_client.py::DjangoOAuthTest::test_with_fetch_token_in_register - django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or cal... FAILED tests/jose/test_chacha20.py::ChaCha20Test::test_dir_alg_xc20p - authlib.jose.errors.UnsupportedEncryptionAlgorithmError: unsupported_encryption_algorithm: Unsupported "enc" value in header FAILED tests/jose/test_chacha20.py::ChaCha20Test::test_xc20p_content_encryption_decryption - KeyError: 'XC20P' ============================================================== 2 failed, 601 passed, 1 skipped, 1 warning, 13 errors in 14.12s ============================================================== ```