Repository: jazzband/django-oauth-toolkit (branch: fix/wellknown-openid-configuration-no-trailing-slash)
Commit date: 2023-11-11T16:38:59Z

Workflow file: .github/workflows/test.yml (Test)
name: Test

on: [push, pull_request]

jobs:
  build:
    name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    strategy:
      fail-fast: false
      matrix:
        python-version:
        - '3.8'
        - '3.9'
        - '3.10'
        - '3.11'
        - '3.12'
        django-version:
        - '3.2'
        - '4.0'
        - '4.1'
        - '4.2'
        - '5.0'
        - 'main'
        exclude:
          # https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django

          # < Python 3.10 is not supported by Django 5.0+
          - python-version: '3.8'
            django-version: '5.0'
          - python-version: '3.9'
            django-version: '5.0'
          - python-version: '3.8'
            django-version: 'main'
          - python-version: '3.9'
            django-version: 'main'

          # Python 3.12 is not supported by Django < 5.0
          - python-version: '3.12'
            django-version: '3.2'
          - python-version: '3.12'
            django-version: '4.0'
          - python-version: '3.12'
            django-version: '4.1'
          - python-version: '3.12'
            django-version: '4.2'

    steps:
    - uses: actions/checkout@v4

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}


    - name: Get pip cache dir
      id: pip-cache
      run: |
        echo "::set-output name=dir::$(pip cache dir)"

    - name: Cache
      uses: actions/cache@v3
      with:
        path: ${{ steps.pip-cache.outputs.dir }}
        key:
          ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
        restore-keys: |
          ${{ matrix.python-version }}-v1-

    - name: Install Python dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install --upgrade tox tox-gh-actions

    - name: Tox tests
      run: |
        tox -v
      env:
        DJANGO: ${{ matrix.django-version }}

    - name: Upload coverage
      uses: codecov/codecov-action@v3
      with:
        name: Python ${{ matrix.python-version }}

  success:
    needs: build
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    name: Test successful
    steps:
      - name: Success
        run: echo Test successful

env:
  PIP_INDEX_URL: http://localhost:8629/2023-11-11
  UV_INDEX_URL: http://localhost:8629/2023-11-11


Failed build logs:
step_name: build (Python 3.8, Django 3.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
  DJANGO: 3.2
##[endgroup]
ROOT: running tox-gh-actions
py38-dj32: find interpreter for spec PythonSpec(major=3, minor=8)
py38-dj32: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py38-dj32: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py38-dj32, clear=False, no_vcs_ignore=False, global=False)
py38-dj32: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py38-dj32: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py38-dj32: install_deps> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py38-dj32: exit 0 (6.31 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1994
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (0.95 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2011
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.21 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.04 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.48 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2023
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2031
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
py38-dj32: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py38-dj32: exit 0 (0.60 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2035
py38-dj32: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py38-dj32: exit 0 (2.57 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2043
py38-dj32: freeze> python -m pip freeze --all
py38-dj32: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2063
py38-dj32: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==3.2.23,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py38-dj32
py38-dj32: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py38-dj32/.pytest_cache
django: version: 3.2.23, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application SGPnovV14C8FgplaOFbAIuLLo4ITOleVmWoNIRjs created successfully.
client_secret: C3Pd6TrBI97d8v9fgR0rL9kqzv81mcQPfCKAd76DxsbWNVchd1KBADllMSAVdpa8nY295z8lGL0doJTD9rQl1YGHjI0TMhPCKeKBqUwhgzKj7MYYLKr5M8POoTgY0u40
.New application A0zUcQGrQGlJFLRZUFqiUTMsWbziz7NOW8meu61e created successfully.
client_secret: p0PhIonKaUAqkRZHvYVtfvcFeYj08gemsNel6s4TYPX49DEoIgf5mED6AgELdSgoTLPOgQczLSNlvK7ZQrkjUKXphTR7PP4yX2ISZKCbpdNDzT9uszdY7rEBbOGZGURh
.New application someId created successfully.
client_secret: tUWeAjkjW9vhIQe7rRoG9PRNAKrqeboOxRufhDMVyIsyRjyKnWGPk5DF2c5mDaWouhYBUj8TzvUUWVK1INOtYiM8pbgjOJlqehu3BTbhVxETBFeiOJKmoTGjnfUaCIbQ
.New application BY14Y6CLvBsX3P4m3L3vdrZ3obt07h1yHVPA2x9l created successfully.
.New application TEST created successfully.
client_secret: 7eKui2UOuOoYMcsGfO87T9HQjPE3liWqOLpjvuyW66Se2lQKLcHtmUxpFI9xw3I2CM1Xi3o3cDZbmPI3WaoFJ4JUSERSE8v3Yp0OiUerzGv9ddVoEZXKTVoJtn2CtzAT
.New application 2V3G2n5DEeZzNENsw6obFVI5d3yvUseS8bm1E7U0 created successfully.
client_secret: DgBNuIZy74DHbOOobykPFL9RJ0UY1ECdZhYoLQqyhBsCtRaXA0NSxIE3IkiKGbxJgfw2dbaF9CII63Ab8UPHmZMqrGcuLTMZbHl77ZSL0SUniZYOBddX2D3yljZcYkRh
..New application BfuIhThqprDX923Cq87rCVga65r1F0olTWuPsM47 created successfully.
client_secret: nLJaiaNx7lHnOZ4Y2o8TR6rqtey8awuJMbCm5SGWXbfWfimfwUAfVp9Q00WE5zN9V4N5hfkXnrFPKndtDn6H0LhmnTpdTJ0eSewrY807NWPhIkMAVXUXKAeSP3GhsTlV
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f2ec6425700>
rf = <django.test.client.RequestFactory object at 0x7f2ec69ed8e0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f2ec653c280>
rf = <django.test.client.RequestFactory object at 0x7f2ec653c490>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f2ec653c6d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f2ec641aee0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f2ec6495c70>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f2ec641a580>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f2ec6386fd0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
================= 6 failed, 441 passed, 36 warnings in 56.36s ==================
py38-dj32: exit 1 (57.60 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2069
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2019
  py38-dj32: FAIL code 1 (70.10=setup[12.50]+cmd[57.60] seconds)
  evaluation failed :( (70.21 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.8, Django 4.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
  DJANGO: 4.0
##[endgroup]
ROOT: running tox-gh-actions
py38-dj40: find interpreter for spec PythonSpec(major=3, minor=8)
py38-dj40: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py38-dj40: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py38-dj40, clear=False, no_vcs_ignore=False, global=False)
py38-dj40: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py38-dj40: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py38-dj40: install_deps> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py38-dj40: exit 0 (6.37 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1988
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (0.96 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2008
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.22 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.47 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2020
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2028
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
py38-dj40: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py38-dj40: exit 0 (0.60 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2033
py38-dj40: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py38-dj40: exit 0 (2.50 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2041
py38-dj40: freeze> python -m pip freeze --all
py38-dj40: exit 0 (0.33 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2061
py38-dj40: asgiref==3.7.2,backports.zoneinfo==0.2.1,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.0.10,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py38-dj40
py38-dj40: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py38-dj40/.pytest_cache
django: version: 4.0.10, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application 8ffgJyzZPrslIKsSr3J10TaJ81kkTK3XzUtPWTut created successfully.
client_secret: x9fkoaqxjtIVaePbnzzfPdWL6fPgKnbDaolivxld10zZT5GSgnzEhAtrzidzEsRlnyMDfo8QCTMEwchcGRAqoWPqeyfixQU0VrXXqlzTpOyImY2g3mRYXW1lpTFhv5dd
.New application YNhSUgMBVZr2cNu5ZyMevxtKMumUtFmRCzfTCuFA created successfully.
client_secret: YwhKrCqv0pb6nuqkkmi7jYk5d1AwrNthOpBv7uqSL9c7UHvvH4Pz3EwxLGoqwfsxBBut8POrVlUgbQKC8uW1byKTNQXALxP3L32tkdrcit42iAJZ9yk5532yEbtsKuHv
.New application someId created successfully.
client_secret: MMPnvx621fHeR78x8diXblVe6CZBDVssBonKhFdxPPOk82K0MgqMvCJmhj8gZFcHlugNbErp0ErNa6aWqPwLBnAom3WGwaWDEAlqcQairYYoIqUARk3w9JSpZa2RZyg4
.New application a3DVa76DMW4HR8b2Jcy4W9ih2sFtgCQaEvbgA6nK created successfully.
.New application TEST created successfully.
client_secret: 0JLmjpTbsXKHYQI3k8EXGNi81S2b3eL61N53hRfmp9yyUbzcDE2pg1HcxIE4xs2R3CJcA2ePcakZ0qg6jFAR35yAfLjUOzAUTCI0KCBX4eHiVhMCW2jOLJiWDvP1fdfe
.New application LrotnoGIieRQaHxy0CDU1nsaIY411plaOMaRJWrb created successfully.
client_secret: 1hDlfMsGHBemQXqkgu4HU7gHWuZvFRILz7UB99GjFThnqrxaQ894y3HyzLwx3cfITqT8UAJIVAHCHLo9lJZXvBqJ1M2sSiIKeGQezyGIvo4CxwBVCF5VgNmX0MMrXwvF
..New application NaSoftMbFfb34XzaJPnlzWC1Uo31Fte8jz9CFmrt created successfully.
client_secret: rCyY0AoUIPDqEphTv9huQDeymz9AhYcTXjuhJKo69JTMLvt3U1osz8rvbVYIWUfh0xG7TLxRbsF20gdJW5Hgd1rQ9dG1GTROulZjtCyiPV19RI1N0MSdnImA3UwoSnIN
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f04c72e6d60>
rf = <django.test.client.RequestFactory object at 0x7f04c79a7e20>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f04c7a37700>
rf = <django.test.client.RequestFactory object at 0x7f04c7a37790>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f04c7a37220>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f04c7932b20>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f04c79324f0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f04c795fca0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f04c7daa730>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 66.68s (0:01:06) =============
py38-dj40: exit 1 (67.73 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2067
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
  py38-dj40: FAIL code 1 (80.18=setup[12.45]+cmd[67.73] seconds)
  evaluation failed :( (80.27 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.8, Django 4.1)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
  DJANGO: 4.1
##[endgroup]
ROOT: running tox-gh-actions
py38-dj41: find interpreter for spec PythonSpec(major=3, minor=8)
py38-dj41: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py38-dj41: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py38-dj41, clear=False, no_vcs_ignore=False, global=False)
py38-dj41: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py38-dj41: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py38-dj41: install_deps> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py38-dj41: exit 0 (8.15 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1922
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.21 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1942
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.28 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.56 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1954
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.36 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1962
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.12 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
py38-dj41: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py38-dj41: exit 0 (0.73 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1967
py38-dj41: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py38-dj41: exit 0 (3.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1977
py38-dj41: freeze> python -m pip freeze --all
py38-dj41: exit 0 (0.38 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1997
py38-dj41: asgiref==3.7.2,backports.zoneinfo==0.2.1,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.1.13,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py38-dj41
py38-dj41: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py38-dj41/.pytest_cache
django: version: 4.1.13, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application AiiS7OCtovqYWQRe283u9If1c2BURPHaSD6K4f2C created successfully.
client_secret: i0HAOa7gU6YLAHeHCPLBmMxUJFGe3aiuIOOpUjTMRKQ6aM90Yb0KYH9j9N1KkFB50DqEIZlyT6LgK144Bf95WpEXQyNp2l5RyAEZwOBnnb6nQyhyJrO8BjF22k3YK16B
.New application JfMnr20aEkXWpWK07oAVLR48RvxPzB5N8xrqmolr created successfully.
client_secret: Wlcx916qZUljxnQ2MbkZgEgs0jRZinOe0UJEivtm99T4l5fqSJkVVinTIhG6ZM22XbpA4MsLUdVGnlMxgOsOzo9k3KnO5M39yysVTQymv9JxYkTYNZ1ZgQ8WIhypxCCq
.New application someId created successfully.
client_secret: GOrIy1vfUdXQwSVrt1fxLFGDe2VuqwfizBySeh6tk3dD29gW8Z5dVOH4WwStZ06GABOzU9hPHdjckphQP936T8JF2hP5ehc6KEpTW1G6SjrQ1aL29poOhuVRkmLERFWF
.New application XUa4x6EPWjvDod6EplqyQNZGPmUj2zxx7d3eTy1J created successfully.
.New application TEST created successfully.
client_secret: fzr5yWSpWojvGvFzdZF8cU1Yf7QuI2houq0csGhZqKICmtXz0BILIJc00krUkb0jltzWLry6cQCtXag3Tm77ktuU4P9v23dCBEtfB3VEoS9rmB96vDIPNsVLhr4Gog0w
.New application KN1Vs4kuVg0Zaj4gTbbfg6qQA63ZUNK0DB5CKTbr created successfully.
client_secret: NtscdAQp1ImfqrOTuy4YbMEI8Zi7SbtysJVWkJ7jeb5he5T7B83PX6YVXo1XZKK3wEbYGQqi1rY3pF6SQLMHqA8bOZ2BYnHYq94ScItiQqe0CgJ3wsU07mG6uxeNnhGS
..New application nhk1Qfwf6O6ZLN4dsfVnxDezrJDWJwzUum3OjwO6 created successfully.
client_secret: vel2R5D187rsCP0Ly6NbrdKguUguM6iVyrLRKbcwdnCyrlbRyaF16WrOS2pFev2cVtunIUavZb3MTP4wVqIiIZ3whrRABXK374nkQsAp8AGWkxO8prv2RcfZkuyrHn1H
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f1fbf81ba90>
rf = <django.test.client.RequestFactory object at 0x7f1fbf8fdb80>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f1fbf88e670>
rf = <django.test.client.RequestFactory object at 0x7f1fbf884730>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f1fbf88eb20>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f1fbf8bc520>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f1fbf8402e0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f1fbf8f5d00>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f1fbf8f5c10>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 190.52s (0:03:10) ============
py38-dj41: exit 1 (192.18 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2003
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1950
  py38-dj41: FAIL code 1 (207.75=setup[15.57]+cmd[192.18] seconds)
  evaluation failed :( (207.92 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.8, Django 4.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
  DJANGO: 4.2
##[endgroup]
ROOT: running tox-gh-actions
py38-dj42: find interpreter for spec PythonSpec(major=3, minor=8)
py38-dj42: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py38-dj42: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py38-dj42, clear=False, no_vcs_ignore=False, global=False)
py38-dj42: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py38-dj42: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py38-dj42: install_deps> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py38-dj42: exit 0 (6.55 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1972
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (0.93 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1991
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.21 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.47 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2003
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2011
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
py38-dj42: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py38-dj42: exit 0 (0.59 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2016
py38-dj42: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py38-dj42: exit 0 (2.51 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2024
py38-dj42: freeze> python -m pip freeze --all
py38-dj42: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2044
py38-dj42: asgiref==3.7.2,backports.zoneinfo==0.2.1,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py38-dj42
py38-dj42: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py38-dj42/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application HapGaVbfs3HskLO5TaWJbajm0YslPTPBVjGZiVcL created successfully.
client_secret: AcU9gVcsF6xwJi7IsxXVDYNGJoRRBzF1dSZYsc5Kl0fvNuFdXAnPjkgxt9vAf74zjVkWKV9ZxGbOpP7Je4K7yw6QJpwtj77lRdUvSXtxsZgYhInp0nXPnniWlSkGYeKf
.New application GG8kvmPp99iDTHwPBqfxOVFeRGuiAurqD6NJnseK created successfully.
client_secret: pzhx1nvKUkC9gLHMnaNcw2UVdR41Q59uz3xFL08aONKQuXEYGHriTW8Ou9ctH15VZ6iqvMmAewcBzft2jXzIz8iuMSXDfLGQZXVa5iYN4CtRDgbP9w0RGO5E7r6ru58D
.New application someId created successfully.
client_secret: a5hgOVDO0MuCxWhTGegTQjpxdQesSMJ2meodaKCYNiFWndx8HrL6gjox0yPTUHw3YoF5jfwP44a77FIy3PcFaPMLvBJ6omM1C9Fu6gDvLDDBYT91HbE39TqAHzwBfCHz
.New application yxSW0GsVV0Do0cjzE6zVywMvhNsPuiedtA5d0Fw6 created successfully.
.New application TEST created successfully.
client_secret: Yx8Tzygxrj1XqxuaGUoCpD2HrGbTB2Gftpm3Rd53zsCwxjiOdbWQlBO06XslWl8amznJYrNQLTLwjsZRKzgMYKiPRIyD4doqQk0ry0rk9RJKfrUE5rpPdfTpTSgUUWlx
.New application POIaRSiC6OkH9C2dPmW0FWTQEeNBdPR4psX9msJz created successfully.
client_secret: FRe2idqIWoiEnF5EZnotM894swwH55bsKlc8z6smsvak4qEo93bQUhjmzSOyCF85u6SkpMeuJAxqKZgwbacsD90ZTLmuQenNxIWaxXIFFJs7mEj4OWXqoYh1dIzMgE7d
..New application vjSzpyV5jxT0BJT89fTRIWwTm1Nzu3i2Sm5yBBmX created successfully.
client_secret: rK0inbKt5ct8IjQ5xeBW71obhf62T7eQQISf0DAiwNLTHd0UYCNKDDEHdXxb60iU4TNNA8d0aaBYAjH1Icx5Ae2I0xa2IFRlgA5822ruUOlyxoUSF1ugR9pAm9HuyuLf
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fcadaa00fd0>
rf = <django.test.client.RequestFactory object at 0x7fcadaa2c2b0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fcadaa007c0>
rf = <django.test.client.RequestFactory object at 0x7fcadb3df3a0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fcadaa00490>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fcadaadcd00>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fcadaadca90>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fcadb320af0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fcadb3200d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 114.96s (0:01:54) ============
py38-dj42: exit 1 (116.04 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2050
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1999
  py38-dj42: FAIL code 1 (128.66=setup[12.63]+cmd[116.04] seconds)
  evaluation failed :( (128.75 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.9, Django 3.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
  DJANGO: 3.2
##[endgroup]
ROOT: running tox-gh-actions
py39-dj32: find interpreter for spec PythonSpec(major=3, minor=9)
py39-dj32: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py39-dj32: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py39-dj32, clear=False, no_vcs_ignore=False, global=False)
py39-dj32: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py39-dj32: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py39-dj32: install_deps> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py39-dj32: exit 0 (8.70 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1998
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.84 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2015
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.39 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.04 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (1.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2027
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.39 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2034
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.21 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.12 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
py39-dj32: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py39-dj32: exit 0 (0.82 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2037
py39-dj32: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py39-dj32: exit 0 (3.29 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2044
py39-dj32: freeze> python -m pip freeze --all
py39-dj32: exit 0 (0.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2060
py39-dj32: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==3.2.23,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py39-dj32
py39-dj32: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py39-dj32/.pytest_cache
django: version: 3.2.23, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application oFVpVK0R8xQDioMz7vLmr4JRc0aY4fy0ICeKV6Xb created successfully.
client_secret: 9j0dku8KjS1zbcoDNNOYAbLYF5h3jCpTDVx6DCBBkKUUNeNBOmtId0BUmABq3lfBsFLum4Yctrqtrzc02vvc8ysOajewCWoGby35o9NoP5aXlVritAR6zc7QoozKONgc
.New application IPkqDhYMIrX4q6tuPlK7AR5T1VtAcHIkxPRZ8yxn created successfully.
client_secret: RQUdft7FhWo2RRmlgsnnJHGZRcTa0nIdjnhUol6QjYYhZOr801qLOhC1cMQtIIUdv3nAW6GCjnhR0Z1eIN5wQVVBXP8wEDoqD5vndiHyLoIzYqitexho85PAnOSfpyvy
.New application someId created successfully.
client_secret: AnjMQovAmC2fYBwqJjx1MuhYN0enPKDTUjiEfkcllGGyAp3T1pVxB084DsGiSTTzWIbnDcodpEJgeTFGfJEJdpf82VhkKrsaQPpopOE0vS9X3ZvQN9mF4y7bZDMb50aq
.New application tRX0RmNoEOX8XUB6RFlRzp92Ym9gcDVIjlNCKt1P created successfully.
.New application TEST created successfully.
client_secret: NZlaf3SltMfJETINm10R1QBp7frF5chPGeQ5fDuQAYsRI55DkdPtE3sMHxcJ2zZtNN96lz0nbjwEPdDPJHCNlavIX9tHKNcPfbFnNdXJOZj0qbshwq4Jivkc44DdFp2q
.New application 53IsFEGQ0KUNAd0uaLOrtcfDHVfXX5qyQkaKZP1v created successfully.
client_secret: UUb6VdlVOCIyRvE12ucAnsvMZYuh4XKZC2CMkf7AYfU4DmcnTUa85RN97F1dCMfi1uOgJUGwC6xtjKUa04yU3fBmBoqvHMlvHPjY7z9hi8ysvYEbDrvgoZTxf182Qd1K
..New application JNZE5t3vEd6qB4suWQAwthmvJ8MkZAWjuNphj2Xh created successfully.
client_secret: q3p5JdRQAmtnQH8SRGIibjlbJIjIm72wYln9iEeRFOsCnRabXdep3J0Y1M9YfROgOJbIXLv0JHj9b6qT0qh3ol5YcnkmCkeusSDC6E876szjB38HhbDFc383gYktDRoj
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7880e83e20>
rf = <django.test.client.RequestFactory object at 0x7f7880e70460>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7880ec1af0>
rf = <django.test.client.RequestFactory object at 0x7f7880eb5d60>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f7880ec17f0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7880e6cd90>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f7880e6cee0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7880e90d60>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f7880e905e0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 124.50s (0:02:04) ============
py39-dj32: exit 1 (126.64 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2065
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2024
  py39-dj32: FAIL code 1 (144.47=setup[17.84]+cmd[126.64] seconds)
  evaluation failed :( (144.81 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.9, Django 4.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
  DJANGO: 4.0
##[endgroup]
ROOT: running tox-gh-actions
py39-dj40: find interpreter for spec PythonSpec(major=3, minor=9)
py39-dj40: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py39-dj40: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py39-dj40, clear=False, no_vcs_ignore=False, global=False)
py39-dj40: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py39-dj40: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py39-dj40: install_deps> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py39-dj40: exit 0 (10.90 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1911
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.65 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1927
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.34 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.05 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.78 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1940
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.53 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1948
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.15 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
py39-dj40: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py39-dj40: exit 0 (0.99 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1951
py39-dj40: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py39-dj40: exit 0 (4.17 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1958
py39-dj40: freeze> python -m pip freeze --all
py39-dj40: exit 0 (0.55 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1973
py39-dj40: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.0.10,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py39-dj40
py39-dj40: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py39-dj40/.pytest_cache
django: version: 4.0.10, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application ilev2rtNmXiLPemMzBOr248e3GKQNnhBKJHi8pZw created successfully.
client_secret: 9whFzAdklAzFSolnOoghp5Cw5pLo3lyL6y04Aex5ZaV18HgTcuLFbX8KLdKcHjfPeDp7Rv7iTdXDKHqp0xzG3g4f0orueF6ZigzoMIHxkEDCVZmdwk9W3gZmukB71tSe
.New application SqUJA9ZxJCnErDPv8Ex7shlUeRRqmCGBmK3Q5weT created successfully.
client_secret: pJA75X6IC2pEaZKX6qck0D7FuzWee6dHin3JXI75IBBsxwcQiQ1LWMjtgq89lzUwy0RcDiB2TMZx0s9EPyxCnBAwQUvC9MaXtHX1qQXrye0DfoNOQd49C6M5AcYXd0W8
.New application someId created successfully.
client_secret: PohJnsEENJVW00rN5ARoEluJDtPXlA7PaOAhTveDvwCk6b1tJG0WicNVMzEu6r3Flj7znw5Jg7vIJJFM1E9F0IhgK9l9iVfaYabuqFxSksbXqELKBMvuXHU7c5uTzkqH
.New application PGiX56msbcc6qigWjHOmstdf6tyDUNFMxFNXD0Uj created successfully.
.New application TEST created successfully.
client_secret: 3MZACBvQOHeK2PJFdv897iQzSA57njGlGMXILWpurMoOyPhcmVFIvCF4veOGeNSWw9ALD7YbLup0X8S0hAPQeA6vxeVunqDNL7ylIbiealmSsswlM4qajYwM5Akoeh8k
.New application RXBDhG90stR3Mnitwu0NOCeJCmNy2uAoebmCVWb0 created successfully.
client_secret: a12nKunooClroEPTQ8HkDJl3c0QhDduMIPYgaeO3s8KQJYMQNsyfV1uaN9NISPodfzAzoPjYnEgTKlOtirw819DB9REYIpIlBhxbMOF1SidH1Jdx0JJXSgng1pFLf6nQ
..New application 1j8MnmpZ5s8YqdjR7NJahpf1oFzjWfgLJci0EsyU created successfully.
client_secret: HXcL5dz3OGi1eLeAH4WtM7xqafWct7EgJ72aHfNnKixCKhHNbWZ5G2CK6PgppI0OrYBRFLsXtx9vUDnglQowSyREouTfyhKXDW4GcceZ6NsNIMErMdQtaqa9kUKqu1kE
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa15ca057c0>
rf = <django.test.client.RequestFactory object at 0x7fa15ca05130>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa15c9b6b50>
rf = <django.test.client.RequestFactory object at 0x7fa15c9b6880>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fa15c9b69a0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa15ca31ca0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fa15ca31bb0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa15ca080a0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fa15ca70610>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 183.13s (0:03:03) ============
py39-dj40: exit 1 (184.91 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=1978
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1935
  py39-dj40: FAIL code 1 (205.90=setup[20.98]+cmd[184.91] seconds)
  evaluation failed :( (206.04 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.9, Django 4.1)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
  DJANGO: 4.1
##[endgroup]
ROOT: running tox-gh-actions
py39-dj41: find interpreter for spec PythonSpec(major=3, minor=9)
py39-dj41: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py39-dj41: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py39-dj41, clear=False, no_vcs_ignore=False, global=False)
py39-dj41: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py39-dj41: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py39-dj41: install_deps> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py39-dj41: exit 0 (7.12 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1965
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1982
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.23 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.50 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1992
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.29 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2128
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
py39-dj41: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py39-dj41: exit 0 (0.59 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2131
py39-dj41: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py39-dj41: exit 0 (2.55 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2138
py39-dj41: freeze> python -m pip freeze --all
py39-dj41: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2154
py39-dj41: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.1.13,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py39-dj41
py39-dj41: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py39-dj41/.pytest_cache
django: version: 4.1.13, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application 3hsy2XP5gAfcnGkCPqHY1Gm7TbJafasrI8ODssVh created successfully.
client_secret: 0nH6ivbYKKSYaX3ANEvTiSnVBCGEu8lUjW0akCq0eEEAgpfhuJZ6pOiQT4vDxkNxcRQ2R7Gwyw1LOwPpDgpZy6Jixzhb7kW2iDzvjk2Qy5qmLXAe83cES7ldDCEsA4NS
.New application bhq0GycVPhE2GKovBj2nXP0Rv7JXuy6bD9X4oVO8 created successfully.
client_secret: ekuc3xLWw0FVk61XtgB9aSFhoJFZ0p3DFL7M5iBeBAeADuK3zche0d08JKhljNGSWYzbhbS6MmrUHTJCt7gvZIriDRQ6KthyhkfSYridBkY3HeHvoYcwoTB1MCLfLkbF
.New application someId created successfully.
client_secret: uH8tPOWriXP5UC4Pgi9777rqlr35cMf6kKBmfylRG3WaqqESDfKdd3j6Y3ibJGAblIXOX5TWkeeHkGwJszP8QGSQQwmA0rFHMknrRjZdLOdQSfPkiZRQ4qh4nxYFe704
.New application PBcGnfQJeUMD05oYShOp41pSWLYNmfCmjFLLIPx7 created successfully.
.New application TEST created successfully.
client_secret: rEmR60goZA5GJyHtHkSB84RaSc32cLa4gtErjNVZnVEg8dF4lsCgxYyklwHcVzDKadXsEXWeQ6jCkC8IVb7VPnnRCHHbAXzZ2Xw5uuU5hvzdj1SF14rSB1M1yLsvzbuW
.New application 1gPsRngYmA40eDSDvv1n3jXWZmJJHTcQ6ydLLyXG created successfully.
client_secret: jzigP2pxdGQoR01TxQpTHkytjIwT2Jh1kVbrNTwFYhm4DNg2q86Sxga8YKbNbEnEXZ2CdLvmLa2tpTmZe2IBhjcmpCufJsu4GW3ODzGc5Jm5MVQ7lEN1v3oBvvnzGFaS
..New application tZjY81oaifwngnhx2iNuIOXhnQuSysJaQLwKYTLt created successfully.
client_secret: zoXfTSFZcef2m2FbTSLr3SnUk4hcIiOSQz2Zj9hEbmWUFYvhpIZdFilGOEH4NdyFrxCXtNcpsREITL3RAzK5so22SBdWcfGmL4eHexnQ2u8IzeZyybTZ5Fi5AXerW2ws
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f15720eca90>
rf = <django.test.client.RequestFactory object at 0x7f15720ec0d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f15720d6b20>
rf = <django.test.client.RequestFactory object at 0x7f15720d6bb0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f15720d6cd0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f1572087880>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f157234e070>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f15721160d0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f157212b580>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 79.48s (0:01:19) =============
py39-dj41: exit 1 (80.49 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2159
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1989
  py39-dj41: FAIL code 1 (93.88=setup[13.39]+cmd[80.49] seconds)
  evaluation failed :( (93.97 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.9, Django 4.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
  DJANGO: 4.2
##[endgroup]
ROOT: running tox-gh-actions
py39-dj42: find interpreter for spec PythonSpec(major=3, minor=9)
py39-dj42: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py39-dj42: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py39-dj42, clear=False, no_vcs_ignore=False, global=False)
py39-dj42: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py39-dj42: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py39-dj42: install_deps> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py39-dj42: exit 0 (11.31 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=2022
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.9.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.9.18/x64/bin/python, platform=linux, version='3.9.18 (main, Aug 28 2023, 08:38:32) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.77 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2040
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.35 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.05 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.81 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2050
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.51 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2057
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.16 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
py39-dj42: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py39-dj42: exit 0 (1.02 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2060
py39-dj42: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py39-dj42: exit 0 (4.23 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2067
py39-dj42: freeze> python -m pip freeze --all
py39-dj42: exit 0 (0.53 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2084
py39-dj42: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py39-dj42
py39-dj42: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py39-dj42/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application kpqxH6KUaZhquEVVPwVTmU2jhqFCbAqt9fRY690s created successfully.
client_secret: d1C6qB2yBJiyTjHBSR4cAB7jCgLvzXs6hJvAJa5LWkVEXsRmyDP3MMC239D8RWi5v2iMHH6JnkkoBzi8PUvsnH0iKLFCaLr1qXT4Th453YrcNFpcfP5s7s0D5iDqTgjE
.New application qVpt9ZMFDGNIrhImw7ds73EgXQiLdtkBNhhR5zio created successfully.
client_secret: uieJphMB6qvj3ewv0DlI6cSOK3bTEvoOImDSRgAkkH2zl9mGbEITchKArU4a2FJYTp8J2WRjHARedeKDjfBcV21Tuqbxc5r7MwcjQy0gjeUP1Nd3l9uOyeeMXo0luLiR
.New application someId created successfully.
client_secret: iGedrWdr45IhuPxD9wvLCT8mvWTVREzkvXSkUOQThFkKKGWm59qAYBb5O12Icqb3jeePDgiicRez0vFi18UlFs7e93oBeGa613oEuEVhEfW0SoMvysiRfYP7YeNJnOeB
.New application Fj4G0QbChcVk6U4617uN8uzN14e4cGPa9DxLdkUH created successfully.
.New application TEST created successfully.
client_secret: nxBbqbL5dgzgHNDkR8FQchvJAigUXtnX0FbxvJFr9hbRbYN8E9nZuX3MrusS6CPCfjC02L92v4MLxRv4bd7Hv0KoI4yCncVOiks4awveFKajDl1GAHST9TtvkmGM0SYG
.New application 380gXjFhyw9CACFM4j6RPpB12kb8KvUjMI07CF7p created successfully.
client_secret: B6GlnOfGxAjF5wpP0NcgxbyOOH3i9H4PhHwxj9mAjQp5lx0jCP30nrACNdi3BsoRdnMQiAYlq4znCGWRryy8hq33PsVmyUoHmyfXMMJnssvB5Ng1diVQRR0CstdX4FJ7
..New application GYhpcjsi3iNqAxIRBgke1C3ArlSSgupElxHTTNR3 created successfully.
client_secret: CaUkTzUvO18Jm4mWAmzBVT5OiwmxW77JW6jTjKvHF2pSCVOpHRSr8PGsTlaqhmuGoGsJ3RbnWrKldSoocDgZvvvAuwxQwvSoh1TiOENuJZHYCY6ZjTjqGSUc6zymG0Yf
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7347fb5af0>
rf = <django.test.client.RequestFactory object at 0x7f7347fb5610>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f734513e3d0>
rf = <django.test.client.RequestFactory object at 0x7f734513ebb0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f734513e160>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f734587aa90>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f734531f550>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f734513e310>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f734513ea90>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 333.61s (0:05:33) ============
py39-dj42: exit 1 (335.27 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2089
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2047
  py39-dj42: FAIL code 1 (356.93=setup[21.66]+cmd[335.27] seconds)
  evaluation failed :( (357.08 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.10, Django 3.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  DJANGO: 3.2
##[endgroup]
ROOT: running tox-gh-actions
py310-dj32: find interpreter for spec PythonSpec(major=3, minor=10)
py310-dj32: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py310-dj32: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py310-dj32, clear=False, no_vcs_ignore=False, global=False)
py310-dj32: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py310-dj32: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py310-dj32: install_deps> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py310-dj32: exit 0 (6.54 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<3.3,>=3.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1972
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1988
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.19 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.46 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1998
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2005
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.17 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
py310-dj32: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py310-dj32: exit 0 (0.60 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2008
py310-dj32: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py310-dj32: exit 0 (2.52 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2015
py310-dj32: freeze> python -m pip freeze --all
py310-dj32: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2030
py310-dj32: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==3.2.23,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py310-dj32
py310-dj32: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py310-dj32/.pytest_cache
django: version: 3.2.23, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application nrWWUliGfHiZkWreGGJa1H65YQQ9Vo3ReLuUlKVT created successfully.
client_secret: LPLf3D3hU7rEipWQTnZyuCkZg5nxQpIaCycrUUX4VO3D8Ky4X6LejFtgq2tYoA8fbROut2AmavgUHFWmg9hDix5AIFEY46cCqbcsbL9J8AkeMNowwr4BUhzTvj85JTe1
.New application nU8qLL0weqpd3m8b26KurJmyObRM1ICHwGX76T5d created successfully.
client_secret: PVylDwcNejfOLRlxYN9pzDuh1AAW2lA9g5neJJmyd2TnMmfuNty5vRbr4XtAbi7RDnrtTPp99KabwWRm5rtOz5TrnADF2oc8t7XJCAPpisFiGqeZWbC12uAaXbCGZSmM
.New application someId created successfully.
client_secret: 01wuWJvvy2LIL23cO9smOosZ6Eer2rEPeesAlpTxHGhStOYh4oSfrIPMhdlvQikDfPYPRTL650NsyvuaUjcBtPTTTD2oi4cndImrSy6vaE7SCWPFNSYf6iwy4H7zD8UW
.New application dT3F7TkN2JtAeiZ8JVCDi2hWBr8cheUGzk3MLpCz created successfully.
.New application TEST created successfully.
client_secret: 93IMly91EfJBV7oR6k9tuRLgI9oyvuyPqCGmSIE3ILohRqdzpSe5n9EbCFHYHMSe9nDSqqSAdHXpRi88lbq0vBw7IO39vSeeuB28UIm4kmY20v6UIm4OkXp0Rwvg3xlB
.New application nAcgr3AxfmWIffLKFRNpTMs0xiC2d95i5WRdAU8T created successfully.
client_secret: 4NtOpODsZSzsGryePeA8qXQWBxLJA2w5qL6nmlqHccmV9gPM6qAPibzpdwTQRA28JkVrECq1DIgpLZV6Lbij2mGa61tHmJl53yFmd6b9Kw6idf4shk209jTha3QTpiVJ
..New application XaR7Qn0ZC5tQIvj5OkV83ueXqbqqo4Mslcx1fkzj created successfully.
client_secret: Qp7evftmOH81o2GFlvPdsyt8ZokLFYwD4L1VSQaO1bt5fyVodA6bno4QJGljckVYZKAqOlMT4UHosiIUbqm09b8El4WAMVpiykYkIE2zEgL31UaEHGEd31wLKTdNU83q
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f06901d0b20>
rf = <django.test.client.RequestFactory object at 0x7f06901d0130>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f068fc9b9a0>
rf = <django.test.client.RequestFactory object at 0x7f068fc9b550>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f068fc9b790>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f068fc11cc0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f068fc12020>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f068fc8bbb0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f068fc8b130>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
================= 6 failed, 441 passed, 36 warnings in 57.17s ==================
py310-dj32: exit 1 (58.80 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2035
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1995
  py310-dj32: FAIL code 1 (71.62=setup[12.81]+cmd[58.80] seconds)
  evaluation failed :( (73.11 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.10, Django 4.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  DJANGO: 4.0
##[endgroup]
ROOT: running tox-gh-actions
py310-dj40: find interpreter for spec PythonSpec(major=3, minor=10)
py310-dj40: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py310-dj40: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py310-dj40, clear=False, no_vcs_ignore=False, global=False)
py310-dj40: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py310-dj40: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py310-dj40: install_deps> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py310-dj40: exit 0 (6.86 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.1,>=4.0.0' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=2116
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2135
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.19 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.45 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2145
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.29 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2152
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
py310-dj40: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py310-dj40: exit 0 (0.57 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2155
py310-dj40: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py310-dj40: exit 0 (2.49 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2162
py310-dj40: freeze> python -m pip freeze --all
py310-dj40: exit 0 (0.31 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2178
py310-dj40: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.0.10,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py310-dj40
py310-dj40: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py310-dj40/.pytest_cache
django: version: 4.0.10, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application JkxorfJUGeVBs7gi5lP8p5ORO9jqOPKDUtjlAEwv created successfully.
client_secret: jf3rgYRZQxwNu6MUP17PZphaAqtTPD4LRxQFy7upsVvDkWI5OoPpXmD84r4wkIq9Z9E97zgMYDh4ap1JcvNXjVh8zAaB4fyqFhS4vZ1TP5aIdAlVWSaGjZQMoa1s35MC
.New application T3OiALB9oZAXnQJiCCQL6o6Zbo0pLd1UBeOtKy8j created successfully.
client_secret: Q7IW3V0OTYM2omFEZ20tHqsPhLAw52wzUZF4o6vjVRoDBMNoRfqHtnLxVoeXjhDRl1kbVJX3OFy3KJ96KvRrEbkxxonihhEqYbS2SflNGUudX9jj1CGtk0a2Vq3KbOHK
.New application someId created successfully.
client_secret: 9XQpDIdwPBUZ80raJeiyEenmVVwTiH8HcfKAHNDbCzReKDjWkfAOFvonI9eIL4fJ16Uge8fk4z400nP1H6iJdIjcEvlLCViuPJPiWszShXew9oVZJIuse61wx4C7Pcz3
.New application Tt9sk5ZxaV25cYVhSmhnrw9StptyGxcN8a2Gm6cz created successfully.
.New application TEST created successfully.
client_secret: Y60LCFBcMZ7S7F0myvFgr5LcSHMVPREIKiUpRciKy13loyffAKyMFFUolqbsVJGh2dKPLNNwZVNwoaqIKzmBjaR7rc41IvPWXG6m9Pmu26vDXK5egwRpa9yhNMQFOtaQ
.New application jGV59E719pFwj1GIPjMEo2IkhxtCJhJXy711xUOd created successfully.
client_secret: mZaAK7KrwHIjlzCsFZZ9U0QEIgYpWiWgwzQsMF5rYM2oGqHIDSg8jdOleNE8pD2SkKTgxkuhAE4e5YvuQFWAIkgIdX6CMYY93Z4ogN9HWriJupoAX8qdfjVsG0vGeRdG
..New application 4JLgK2NaObN0LHUsuZExyCdaLqLTyOUoCa5QOdI3 created successfully.
client_secret: 7YdCz73HWJKqssencEqaIBwBc4XSASVJ2RG944H8zIkeciVq0UuJOwVlE8H2GYwpakzRzS60qiwMrPr1kvJgaxURZIGbjal2jdiTYACWBgIb8EokuQxQ6Eq52QymD2Q7
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f343f364820>
rf = <django.test.client.RequestFactory object at 0x7f343ed68370>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f343f061300>
rf = <django.test.client.RequestFactory object at 0x7f343f0627d0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f343f063af0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f343eb8f730>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f343eb8f400>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f343eb352d0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f343eb356f0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 66.68s (0:01:06) =============
py310-dj40: exit 1 (67.97 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2184
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2142
  py310-dj40: FAIL code 1 (80.94=setup[12.97]+cmd[67.97] seconds)
  evaluation failed :( (81.92 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.10, Django 4.1)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  DJANGO: 4.1
##[endgroup]
ROOT: running tox-gh-actions
py310-dj41: find interpreter for spec PythonSpec(major=3, minor=10)
py310-dj41: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py310-dj41: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py310-dj41, clear=False, no_vcs_ignore=False, global=False)
py310-dj41: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py310-dj41: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py310-dj41: install_deps> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py310-dj41: exit 0 (6.82 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1991
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.12 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2008
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.20 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.49 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2019
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.33 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2026
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
py310-dj41: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py310-dj41: exit 0 (0.61 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2029
py310-dj41: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py310-dj41: exit 0 (2.62 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2036
py310-dj41: freeze> python -m pip freeze --all
py310-dj41: exit 0 (0.34 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2051
py310-dj41: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.1.13,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py310-dj41
py310-dj41: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py310-dj41/.pytest_cache
django: version: 4.1.13, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application C6DMwvfzCmE43pRbATYzwVUKGJCzgCrSGLQi5lNr created successfully.
client_secret: VMvQHFpLGhRvoDV3QtrKCeIDuh80KWUSJgq8ObyRGjHb5mpKjmCCCQY5RAq3lnEphrGfcQ2LpX8so2AF9ql3d00ROZAcDUi41rqXlCTJYEa65q83El1vN4ROoMNpGHXI
.New application h4ORGb7SuSGoh6KakWnECq9oO5h95WQ5YtoCaCU8 created successfully.
client_secret: 1W5FUBKNqooUykFWBshwK6mfxe34t0ey2CXFMwnDugqj6EYwcgiDxCtfKSaz4Ke01B690256JxbtDJNg2pFaJskRvgOEndip0LD956upisexqubmAdTqHq4W6mihH29a
.New application someId created successfully.
client_secret: 4QVli0EwvlRQhgWXdYmdjKiElHIcP9vdlT7p1pWYNGy6Ifpm2LIPhMmJl5e3EDhGrvifHiilc123VSSZ5nOXYCONCfHGQtV64zqFkmCjsgi1PVm6KIkmBRDtDpC8RQgD
.New application q6T3BrIKLJSyHXgbBwbmokw238HTAMe9oyPBrw1z created successfully.
.New application TEST created successfully.
client_secret: AuXo9vr2RdhR5IoH3QGLYdfD6c8Xh6yJFGJLC76CQDrn5A7PcFoRQNkAq39kWuU1jaLO4dGsTFUTADF4dAHtC3R2nFVfLOG68RpPEVQAguAZy89UgiuJ2SlXfHLqcfeQ
.New application WpnwJwTWlQF4vPQqwkorqhQNVSOC7EyJ3XiydMOF created successfully.
client_secret: NHe7Ku3xROgN5LdpcrYdiDbwBy4SzNzJznRUlaWJsboL0Q395pwZAwHr37fdC3wCSdiDLx1bucmToGrqTCJKC2MnPW4tb5nNCaqOupZfBRzumWqjx6IoC4gZT1BaYGQh
..New application Q6Za68aF12L1oKW7b9qO4BSZYusGuQkQsX5Zmlgn created successfully.
client_secret: LweZcxXnHqE8hfkMhbT45xMhGOyEwOfHidCCFSshxJzhsyLDZMOgQKE2Fjuw9gWaRhUtdWPpIQVHBchmLxDpuW2izPzlyb7RNrjfru1pHfu2DE8ezi7EEGWtsMs56zhk
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe44cfe1360>
rf = <django.test.client.RequestFactory object at 0x7fe44cfe1240>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe44a4f0850>
rf = <django.test.client.RequestFactory object at 0x7fe44a4f04f0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fe44a4f03d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe44aa154e0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fe44aa16bc0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe44aa4f9d0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fe44ad8c100>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 80.00s (0:01:19) =============
py310-dj41: exit 1 (81.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2056
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2015
  py310-dj41: FAIL code 1 (94.33=setup[13.24]+cmd[81.09] seconds)
  evaluation failed :( (94.88 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.10, Django 4.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  DJANGO: 4.2
##[endgroup]
ROOT: running tox-gh-actions
py310-dj42: find interpreter for spec PythonSpec(major=3, minor=10)
py310-dj42: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py310-dj42: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py310-dj42, clear=False, no_vcs_ignore=False, global=False)
py310-dj42: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py310-dj42: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py310-dj42: install_deps> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py310-dj42: exit 0 (6.72 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1990
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2008
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.20 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.45 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2019
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2026
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
py310-dj42: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py310-dj42: exit 0 (0.57 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2029
py310-dj42: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py310-dj42: exit 0 (2.52 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2037
py310-dj42: freeze> python -m pip freeze --all
py310-dj42: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2052
py310-dj42: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py310-dj42
py310-dj42: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py310-dj42/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application gWFVA4UUXrSbAxC8KdZaixdxbihBxkPAU3EBNOns created successfully.
client_secret: bV7YxNo0wAHhHYwVjoGqizj3EOVvLXJPU7zD0fRSF5CI7R59vJlL4Q1o5Cx6Wt8nHpyrefapbkG0g2m0yVrnK2e7TPCSfT6wPOtFoFCnLtHkkqu2gZy04Jmq4XM05wN4
.New application 3FVaG9KtrfNPQNacKWIMwEKe3c8SCoI3bg66WN2c created successfully.
client_secret: m4JGUrlzq07KCzDlfcrGZoVOhRUPxYPAwNvniblkvwyeoRhRFJuDcgcBwgkVEvkseo7Fwl0m4P5Z1SehXjm8cZLEdcR8tpPpVMutdllyADzCvEYuX3IWaZXAsTy5fzsj
.New application someId created successfully.
client_secret: duwZHu3praXPfFSJGUaI9OtGkdM3kx6iwWeHrHz9DNq16vOMluIoe21zg2HaX54WFcfMkABtQqGNqmYXleDUYm4feZZNCFYilNYl14CNOYHbqdEzhbNBCJwjMlud5NCi
.New application 820EOQ3RhtV1GSZVhs5NK6V6KYJw3vFmHNVsbQsX created successfully.
.New application TEST created successfully.
client_secret: 8gv84xobyvvpq8C5YrUPgI1G2ceD42jwuDjDGc8O42wnBvNtIsbS79AYlRv2wDcD7oJVg2qp7rEiqaG6CF3X7afNfofvXesjjKVME3Przc2cYIZEzuUZjVeHtcs5bTwH
.New application oI0OaYVRpECHUpBca2nV1RMr2wkSsteeSkd9GduJ created successfully.
client_secret: 9xStuwHdt6A48nuaqHh7ODX06vSStNg66dHuoemrb0pNLiq4iYFKSAsG5FFFzic1V39YqRaUt6M6s82lTMr3VI9ZZmvQeS9ORFBA8nn4TorYeeWsgTlGt3Np63Cqxs0R
..New application S3EFRKUg7LLoMyblonxeMJV4UxXixtt64Sek1aag created successfully.
client_secret: LIr8S8CxH0Ej1aJ5k0az5etRzNiilbpRftpLGA6rMK8ZMVJZOol6Q8EHuOZGMfnuBTeZ3uHZcw72AW5K9MYBkITcWj9AlLomT2XlKH0xKghCt6DKnfbuIeVepieZJ96J
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fccd3ff00d0>
rf = <django.test.client.RequestFactory object at 0x7fccd3ff0df0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fccd3787820>
rf = <django.test.client.RequestFactory object at 0x7fccd37875b0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fccd3787730>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fccd3fa5d80>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fccd3fa5c90>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fccd395f550>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fccd395f130>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 116.66s (0:01:56) ============
py310-dj42: exit 1 (117.82 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2057
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
  py310-dj42: FAIL code 1 (130.70=setup[12.88]+cmd[117.82] seconds)
  evaluation failed :( (131.18 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.10, Django 5.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  DJANGO: 5.0
##[endgroup]
ROOT: running tox-gh-actions
py310-dj50: find interpreter for spec PythonSpec(major=3, minor=10)
py310-dj50: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py310-dj50: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py310-dj50, clear=False, no_vcs_ignore=False, global=False)
py310-dj50: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py310-dj50: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py310-dj50: install_deps> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py310-dj50: exit 0 (9.96 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1902
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.10.13.final.0-64, exe=/opt/hostedtoolcache/Python/3.10.13/x64/bin/python, platform=linux, version='3.10.13 (main, Aug 28 2023, 08:28:42) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.98 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1921
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.31 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.04 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.72 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1932
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.45 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1939
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.22 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.17 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
py310-dj50: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py310-dj50: exit 0 (0.89 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1942
py310-dj50: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py310-dj50: exit 0 (3.83 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1950
py310-dj50: freeze> python -m pip freeze --all
py310-dj50: exit 0 (0.48 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1965
py310-dj50: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==5.0b1,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,exceptiongroup==1.1.3,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py310-dj50
py310-dj50: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py310-dj50/.pytest_cache
django: version: 5.0b1, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application 3FbMv3XNAjTqkBWFtUwKajyTSr3YXzvG0yBkKria created successfully.
client_secret: M2o24Sfes8E4NNMgjekuyD8juLZXofE9gT2rBGeE4DwGVrPNtulIQ03Kfe7INGs6ps7wWBi8KcNrDVjIzthoNIUTKME94JzCyJRqy83iZe6DvYGoa2Xq4DPoYGpYVHdk
.New application cwokRe5Srf4p5hB5tnFSLGS0tkqgoNr1oDngTLHE created successfully.
client_secret: XmYRk1msmbyLODizib5jyL2NdFp5xiG5qZYdH6WeL6cBQlWXGSq2IpPC2XuHca9X3Txb6ovCWeHHzoooTLQ7KxUQ69v9SeHyAv3DUsEKVmlryuT3CF6CeMLUT2An22C9
.New application someId created successfully.
client_secret: DIh6bcrNQtUFu6BDFSocgOodILa20AqAirSdzTlchMFrTcaOzCoJVWhgxgX48Br4BXqroxbQLYiLvKe4cJe5PcPyd5VCwM56gKHPdxt0djjtXYGzU0NZYH0AZ013sjoC
.New application oFI46n4lGtWrP6qUIZRGFMsriTU11vfwRHYNjJOt created successfully.
.New application TEST created successfully.
client_secret: RlwECbWO8Nw4CAjWEwiwcDj5cFK7sJ7H1E4kTbeL24Vhe0bChS2pWUSqiMbOfiRsca2ft1jvJOi0XnVsBlHlRSFZuxkzSNyteOnRj09HlDfXs4RujDd2dHGtpcgpojpz
.New application ZQuAUL2wlcLm1rZodpKLp56DLcP0KPersLyc9IXf created successfully.
client_secret: 4pf2dInaqLLYSVAJv3cZ5PoX6xKN4pHk1InujaBNkKEailtaG6KE6Re26JMT0FD8Z0kedBbrR2Dfm6iOjhI4PILaxbxEe5EQ505nppAEvqf57VNxg60BoOkQiZTRlZEr
..New application 0T5mtoEIVDEvv7lhGTa4xXiDHkzR9iLjjGaoPRJi created successfully.
client_secret: ZWSJk0h9SZPtbyNdbj4Noa8nIk0ptdKuCbqpO0JyVuZnpCDJwFw21UgSVIG0SEnzlWeHk3IMXpwSJPoAUznhwTaK6wiFw5Gsxo16C8Z6RqconTGam1bX9bT9EJWBuEX2
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f0f8ae1d330>
rf = <django.test.client.RequestFactory object at 0x7f0f8afa0c10>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f0f8a2f64d0>
rf = <django.test.client.RequestFactory object at 0x7f0f8a2f5cf0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f0f8a2f7370>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f0f8ad00fd0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f0f8ad02110>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f0f8a2bb8b0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f0f8a2b97b0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 383.07s (0:06:23) ============
py310-dj50: exit 1 (385.87 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=1970
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1928
  py310-dj50: FAIL code 1 (405.61=setup[19.74]+cmd[385.87] seconds)
  evaluation failed :( (408.15 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.11, Django 3.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib
  DJANGO: 3.2
##[endgroup]
ROOT: running tox-gh-actions
py: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
py: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py, clear=False, no_vcs_ignore=False, global=False)
py: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py: install_deps> python -I -m pip install coverage djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py: exit 0 (6.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1975
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.15 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1991
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.25 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.47 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2003
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.29 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2010
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
py: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py: exit 0 (0.63 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2013
py: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py: exit 0 (2.46 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2020
py: freeze> python -m pip freeze --all
py: exit 0 (0.33 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2035
py: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py
py: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application THU3mmO4GSTSkFtkpbzPxjxmh7qpv3BmJX70jmMD created successfully.
client_secret: HNpNQRP3jv1UR8Nx7fGQmqOTpPmn0c6YZs9A1Nfeu6N3ivvGgfScQfFJ1Z6pketILjTqjfBrvIwTkc0Cdg2mk4uv753CQVJDJlDK5ZW5RdUYsjkEumX9NZSetVEqYuk5
.New application V5kUe1pq6awPjpl9yzuHi1W4TIgbLqqzpkptB8ub created successfully.
client_secret: DZqOHBCGvXENxwNEmHBHR9ZoYyeAbbbr0iporZ1SMRqaQHD9MtDTCQ7uHle3Nir99UZyGDm9bpHi9rTc1MlRzq8nRND0DQQHOAl6xv5w5ElivcnBZQb2RKwwSKxdwNa8
.New application someId created successfully.
client_secret: IzA6VjosJCPJYHmX5ExuPHBhYW6QPQMAuYek2WlYBuMUH8MSBFBkziMBl1rai2spOviNWTBGz9U7qYedlEBUUEw3WvI1r0ZFJIot8VCWFxTNnUrruGD8Ce90YtdHyIJQ
.New application PEY8nkZzasNamQASLpa9L0WUzb41k2Iniwbsucw4 created successfully.
.New application TEST created successfully.
client_secret: 52CznLANg05y85os82TuXZtxG0XY1nNNT62o1NsySx3QQPgBLRBOzjLu2DSxGgZGUKBBcEUnPPUe0KsooYUles4Tuv7VNcJbgbvpTTlV2fsAaA7I90jn89FzgVa7dV8u
.New application Uw0Y2CUXTqGmspDFR3ZVaIjqa9U965L87eK6O65n created successfully.
client_secret: zXJF7wLdmpjlfQEEnN516YYhZXijB4aiyBeyr3ueKYzpvBu9O6XcvZjccEyLL3UwngDxqk6yW5D977GYCCceaFGPP97iTFczFlIFJvCdO7Fg0tKOTW9qEGceRT5U3134
..New application 0qySOYho4qp8zqaQuMN3eI3PMhSksRd4aqRvbZfj created successfully.
client_secret: hd1ekXpy2Bekt5iXUsYYUeMri3zIcujiNKxI6w4zwNSanUzy7hjDWklWussuf3nyGOU8LlF0be5sFpDW3wvT98hzaqvWXIEM0HWJkaRPmZu4mXXt3uzn7I1bUPRT0pxI
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa57d8be890>
rf = <django.test.client.RequestFactory object at 0x7fa57d8be350>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa57d917350>
rf = <django.test.client.RequestFactory object at 0x7fa57d917150>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fa57d917010>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa57d8aae10>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fa57d8a9a50>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fa57d8b8e10>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fa57d8e2fd0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 115.81s (0:01:55) ============
py: exit 1 (117.15 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2040
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2000
  py: FAIL code 1 (129.56=setup[12.41]+cmd[117.15] seconds)
  evaluation failed :( (129.65 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.11, Django 4.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib
  DJANGO: 4.0
##[endgroup]
ROOT: running tox-gh-actions
py: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
py: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py, clear=False, no_vcs_ignore=False, global=False)
py: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py: install_deps> python -I -m pip install coverage djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py: exit 0 (6.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1993
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.16 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=2009
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.38 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.02 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.44 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2019
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.29 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2027
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
py: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py: exit 0 (0.61 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2030
py: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py: exit 0 (2.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2037
py: freeze> python -m pip freeze --all
py: exit 0 (0.32 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2052
py: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py
py: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application lOfbrqfPhoo5DUbQVU40rWTueojCtFUoFKjZAqkX created successfully.
client_secret: LY4jCu7bMTJkyEz2qSLJdUPRC1qNxlZnWYYeKsH7NlTS9mnufrAd3D9b9espUCkZzxTP2lLAZCvnPoWGxFWY5v2QYrQsIJhgyJtNdlRZhWzF5EhnUwFCw21K1brxkZce
.New application Mw0E4XEV41UQgnxEp0FDhdV8UyGcKn9iDQvlM2hS created successfully.
client_secret: EQWSF7niC8zRtbyp89cJ0RVcQImOhG9rX8q7pSvDsVtAu7yMCL0O76XxvCSw9jABLIhxQvFGOJ9P8Y4aS6QiZpND6q3T8BpHlsmUI6ESnAzFeMUaQUmNzWuGRW35iTe4
.New application someId created successfully.
client_secret: dPV44igsj4awjkZCfPB8IsVBazpgdseu2pqrtH6hS6XIjg3HKOP5mtX393z7E77EAUA6PGKb9M7IIFZY5MW5O8SqaN5H73oL12o1PSoDdZnmFQTe13etewIOC2rBoTwO
.New application 2mOJPMCJvl796t08Ks3UVlEffEuXign3BjsLyUPH created successfully.
.New application TEST created successfully.
client_secret: VvGcKut02aVaBjbYapJeQUaiM4R0rUCNSklB96ovlidOX6IPBXpLnbhEmocD1qesIVHXNb42pc6I5Hrp1oKI76ftwgBHmj0H6lNKKTRLB049klTR1MuoowhagH2pEzau
.New application nIsHwQxChwkKoxO675nxJIFeqYkLHV73A0R9UoBe created successfully.
client_secret: 6rWYWrvnMNJVfNxRyVURA6JWEYxbWZDveA1tcujfJsee1wIqYeBPrG6q1F8yENlRPrkshtIz3Xi7Jtbf087NM2IoOBpAKu51QeWRovDR9cPtN0VWYDCM2ALa11HvBDjp
..New application 4MyRyGgBBcVzW6hvagjSuvh0WLABXTP0layakgBY created successfully.
client_secret: sBrXIMLeLKLjIPyRQMQE4cO45jiZfL8MqJDJMCzqvPmB2mPZfL7QbRWcnWZm3bBpv6415Fns4KoeVkAmbNiHpQztNyCIqocEWlKys9RFEfTO5c9473ZeiqUPo6a4g8vd
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f3f2e255a10>
rf = <django.test.client.RequestFactory object at 0x7f3f2dcd8650>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f3f2e229e10>
rf = <django.test.client.RequestFactory object at 0x7f3f2e3e7e10>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f3f2e22a310>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f3f2e201450>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f3f2e2021d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f3f2dccf0d0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f3f2dccd050>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 115.25s (0:01:55) ============
py: exit 1 (117.64 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2057
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2016
  py: FAIL code 1 (130.00=setup[12.36]+cmd[117.64] seconds)
  evaluation failed :( (130.20 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.11, Django 4.1)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib
  DJANGO: 4.1
##[endgroup]
ROOT: running tox-gh-actions
py311-dj41: find interpreter for spec PythonSpec(major=3, minor=11)
py311-dj41: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py311-dj41: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py311-dj41, clear=False, no_vcs_ignore=False, global=False)
py311-dj41: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py311-dj41: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py311-dj41: install_deps> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py311-dj41: exit 0 (6.21 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.2,>=4.1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1980
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.16 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1999
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.22 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.06 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.02 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.44 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=2009
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.28 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2016
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.09 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
py311-dj41: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py311-dj41: exit 0 (0.61 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=2019
py311-dj41: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py311-dj41: exit 0 (2.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=2026
py311-dj41: freeze> python -m pip freeze --all
py311-dj41: exit 0 (0.31 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=2042
py311-dj41: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.1.13,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py311-dj41
py311-dj41: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py311-dj41/.pytest_cache
django: version: 4.1.13, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application 4g4IsBidQTUUDiKndn3pfjT90F3P1pAITVaeN27a created successfully.
client_secret: RSSFSrDij4jbGzS7UDeKncTqDlc1zoZkIa4AsBsjInUApkqXME8XAMsB8HDRDxZIqJruNWDcDVIWsvQqXXmIHLLpk5ytEw0q9Bcw4OWluKcfOVN2CAwcajk4HqMXqLAx
.New application lnSpObazzJG3rbJoQjb4NiyoZK5EHPpkAAKshxdu created successfully.
client_secret: 8rTxyEJ0DhvTPLQ4LJkXecZZjbWXkDjFswuHhHSOOgCii5lsqeAcnVzar5jYjnaiCT9yYmKslaDeyr9zbdtT2kuRoFeF5KgylW6DIoCibGjydH5BI2J0aAqwoD8rjOfn
.New application someId created successfully.
client_secret: sUw6rxz8bD1O7OMQtjZW2QMTCWhqnVmCFvH6bRIv41iHeR2KIOm1J2Bf4q1aMs6kPrLd5rNaclWBF3newGqlvK1bOkvoLlymqSvw6Fq8JFEVJqr5oWx2lVCLukxueEBu
.New application JJk96hwXbQ8GcEjIYA58GvSldLylTts8GNEKw5dd created successfully.
.New application TEST created successfully.
client_secret: CKbb9TYa93k2fM6rcCbk33ErSCfjVp0U5ZGTgpFu5HGw2oXXzkSQGLuIdpJrEiJtcmV7qUPMTgX42teDSExi04tsxIFpIpVdZQUjnGgHKsgnXsZgxaIiLiHU7WSteZta
.New application Fia2bj2wQdNDSN4PAnnUwp3NXGBvP0I2inGTZsPi created successfully.
client_secret: O2NrI4v04gkckqxTuBVFjKntdJgbjjwpio6CNxURgCLhC004N9oE946rujkdKXd4fEJvqKbb1BwnuWvletThZna6ko2MEg6pccV5yQKJsqRHZ0vvSvjTRmW1bOwiXRNs
..New application 46we10CjW4wR0MCDoqweIIVTSRItW2VASrpsaFfP created successfully.
client_secret: rdkb0SuSLy4mUgOuqHqM6ZlfMVnTf6iQHv3iKvUB2YcjrQIN5XxcLHyJiscQND8gM2LviScEF8CQb0mfmJtRdbqgH4YxePp8KdpwL2eiQWhdD9IBMVu2Wqw2krMShKjR
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7bc089e210>
rf = <django.test.client.RequestFactory object at 0x7f7bc08bac10>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7bc0fc0290>
rf = <django.test.client.RequestFactory object at 0x7f7bc0fc2990>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f7bc0fc1f50>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7bc0e17150>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f7bc0e15c10>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f7bc0e4d8d0>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f7bc0e4ef50>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 77.74s (0:01:17) =============
py311-dj41: exit 1 (78.69 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=2047
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=2006
  py311-dj41: FAIL code 1 (90.99=setup[12.30]+cmd[78.69] seconds)
  evaluation failed :( (91.07 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.11, Django 4.2)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib
  DJANGO: 4.2
##[endgroup]
ROOT: running tox-gh-actions
py311-dj42: find interpreter for spec PythonSpec(major=3, minor=11)
py311-dj42: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py311-dj42: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py311-dj42, clear=False, no_vcs_ignore=False, global=False)
py311-dj42: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py311-dj42: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py311-dj42: install_deps> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py311-dj42: exit 0 (7.34 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<4.3,>=4.2' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1931
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.34 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1947
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.56 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1957
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.36 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1964
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.10 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
py311-dj42: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py311-dj42: exit 0 (0.79 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1967
py311-dj42: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py311-dj42: exit 0 (2.99 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1974
py311-dj42: freeze> python -m pip freeze --all
py311-dj42: exit 0 (0.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1989
py311-dj42: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==4.2.7,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py311-dj42
py311-dj42: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py311-dj42/.pytest_cache
django: version: 4.2.7, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application e3yqT1dDqMYvHiGCBVl7uJJpnU6hJfEExQa24p1H created successfully.
client_secret: ecqsw6kTp9c6dIXPWxtquaPTbLYuUmDT5hyv1P5yQU2YtYQ0U1aJFbQ5ps3EVlfpMjmM0HDhLmP9PlsFhFHpZF9MQ9Z5nzhX81As2TNPVrajuntEj5GvdUqsZHXwPhQN
.New application 4xzGwzo4Mb3H3Ytar8aBMh5bAOuKzqQyns2LMvgH created successfully.
client_secret: AE8XA3FJ8n456cMUYNVoxNwtxYT6PM2MXUPgMk4eEaR34leuN0l24qEXXvhsxrOuj0QMk1cldAmELHRbeLx6P1G3iwTdvcZlwx0KnGL6OcHTz7UNMQc3YDBRf2Y2L2lw
.New application someId created successfully.
client_secret: wtPR3mWgB4KP0SAxyyI1NwDQ9U3gzf1mwEKAwpmBGFEf1R5TV8SAqfLGS2hzzz9NWr2fXJIPRawyGYq0waf09U5s8TtMXv2ger3ysmctahviuUqQjjW0Np4edJ1bmKnd
.New application vcxHrTjMYFyq1jb36cw89hGjD5Jd4tf1QT0a5GZE created successfully.
.New application TEST created successfully.
client_secret: JUUjpLp8e8J3MMllbtZUW95Sn73QlDXfzAw0RVp8RIGxsc1rJ9uBkR04oXZMZgN4e6oVvDDMm3XZiRLVUXjsiCiO70SNZ124vyQs9VK9sZafsCg1suINFB8CqYRrBIWA
.New application cFbrqE4p207YOYlTuXRwzcfKmrViS2iuskdZtp0G created successfully.
client_secret: J4RaSKbMxTWyrFYfgz11PsIBVNK6w1FocDrtg5L4A0xaMQAi4lQIgfCs3LfiSfDiAfJWpAMIAgULAKHQLSFGCKuIBdfS0PZh7x7UyiyHGmi4JNygDXj1RAF9jK6x6Mns
..New application OTGBYDVkAayViD5IT4qqTiTPMbbNLLBJef3HLnCt created successfully.
client_secret: qCGE1EXD87JPh9XvP9iov6JWwja7OulGqn9hAhzcKK8TJ1j2nPOvUg3Jvqfscd8P5uaPjmgFdzGbJyepONXZF6m0cHvafs5GX2uvoP51mZEGHK5wGXRB8thUBsU45sYt
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f5d343d4b50>
rf = <django.test.client.RequestFactory object at 0x7f5d343b17d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f5d3471c550>
rf = <django.test.client.RequestFactory object at 0x7f5d344cdf10>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f5d3471de90>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f5d343c33d0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7f5d343c3310>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7f5d34232a50>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7f5d34230d10>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 266.82s (0:04:26) ============
py311-dj42: exit 1 (268.59 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=1995
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1954
  py311-dj42: FAIL code 1 (283.42=setup[14.83]+cmd[268.59] seconds)
  evaluation failed :( (283.58 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.11, Django 5.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib
  DJANGO: 5.0
##[endgroup]
ROOT: running tox-gh-actions
py311-dj50: find interpreter for spec PythonSpec(major=3, minor=11)
py311-dj50: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py311-dj50: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py311-dj50, clear=False, no_vcs_ignore=False, global=False)
py311-dj50: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py311-dj50: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py311-dj50: install_deps> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py311-dj50: exit 0 (9.45 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1896
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.6.final.0-64, exe=/opt/hostedtoolcache/Python/3.11.6/x64/bin/python, platform=linux, version='3.11.6 (main, Oct  3 2023, 04:42:57) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (1.69 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1913
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.08 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.69 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1928
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.46 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1935
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.13 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.13 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
py311-dj50: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py311-dj50: exit 0 (1.05 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1939
py311-dj50: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py311-dj50: exit 0 (3.66 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1946
py311-dj50: freeze> python -m pip freeze --all
py311-dj50: exit 0 (0.47 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1961
py311-dj50: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==5.0b1,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,setuptools==68.2.2,sqlparse==0.4.4,urllib3==2.0.7,wheel==0.41.2,wrapt==1.16.0
##[group]tox: py311-dj50
py311-dj50: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py311-dj50/.pytest_cache
django: version: 5.0b1, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application BiEwoP9BMxvTM6BRD41fKpfldLKoewdMAbTG0mO0 created successfully.
client_secret: xlyqUqwBPx08XdRhJHtDBjOSsYtXORmjq0To8H6o1Fs1LTLgUQ7D5NzLi76E5GJt5VU0Gc7MzSTIyfMce63vJYTtBxZTfpSCDZOYQsb0AG4iSsVgV5J0OHu28aCY7Avq
.New application i6u1bZmvvtJUyfT90C2ioGv66L11JY6LGFI1IUeB created successfully.
client_secret: 4Nuzgc0qrA3I1WBAT7PlMWgKCR5sy8VUSdSAbbjhgmyy4RzEuGRhdtYC0CEEnbGARrERQLJOi9wxeBf8eqkYMxFmVkWZD37hRT27bS7ENcCEX0KPaRPbLCJlTbZiUxop
.New application someId created successfully.
client_secret: YFXK0Bh6j2ie2XudkwpHDeS5t4jZiSWrqYLJvJETS519AkDSc1bF3sGyzGhyYwaU12S1i9M0FhwY9Ww1W8IZUuX3Zg03ANObaFkx8F8I8PISjSIt08U4RO57naA6Umdu
.New application dHDtzaczjHVq0RaupBfPiI9paMzUSno4LCvrWLjO created successfully.
.New application TEST created successfully.
client_secret: rPr9EPPuY1KWLx5ZxflNsj9yfCrcXOlzYpIJgzio67zq0NlMZI0LANrw9gkINBWUWzz4nwZFIt5lwW8jSxKwYz3tbL71C27d1b2kj28KdfxcittHEufphDl5PE7szPfO
.New application VkGFWbzDSMdGbhAj8FJXrg971791P0Dez0GBAXPV created successfully.
client_secret: s0UmUauKujie6dTkE7AAQoacTM8eR3hkTq93AykNY154gEP9nNQB9MRjz8dfeFLXVlXfeFvyYFEuA8CPVoK0BF8BO1YJ1S3n0PMiW0hCPMAx8wv00v4vIFRQPjE2cynY
..New application hgpeBZ8j15aLsZGP6JNb6RuoqAennlLvwoj1goJZ created successfully.
client_secret: d4FRGkOFn5qwqm0Ob7J0VuooqaRG0MWVA2W1cz730EeAY0r7Le15BWUWJhIdxXw3j2veDkVI5pm4PvOOd8Bjrf4tVZDYqUVvoL8ZeDNirJSZTrGYKVNyCYsRVyJt9H3W
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe9bc26e5d0>
rf = <django.test.client.RequestFactory object at 0x7fe9bc26ea90>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe9bc827a90>
rf = <django.test.client.RequestFactory object at 0x7fe9bc824390>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fe9bc826f50>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe9bb8ecf90>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7fe9bb8ed6d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7fe9bbebce90>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7fe9bbebd250>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 36 warnings in 381.36s (0:06:21) ============
py311-dj50: exit 1 (384.05 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=1966
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
  py311-dj50: FAIL code 1 (402.80=setup[18.75]+cmd[384.05] seconds)
  evaluation failed :( (403.06 seconds)
##[error]Process completed with exit code 1.

step_name: build (Python 3.12, Django 5.0)/7_Tox tests.txt
log: ##[group]Run tox -v
[36;1mtox -v[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib
  DJANGO: 5.0
##[endgroup]
ROOT: running tox-gh-actions
py312-dj50: find interpreter for spec PythonSpec(major=3, minor=12)
py312-dj50: proposed PythonInfo(spec=CPython3.12.0.final.0-64, exe=/opt/hostedtoolcache/Python/3.12.0/x64/bin/python, platform=linux, version='3.12.0 (main, Oct  2 2023, 15:16:58) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
py312-dj50: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/py312-dj50, clear=False, no_vcs_ignore=False, global=False)
py312-dj50: add seed packages via FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
py312-dj50: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
py312-dj50: install_deps> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests
py312-dj50: exit 0 (8.52 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install coverage 'Django<5.1,>=5.0b1' djangorestframework jwcrypto 'oauthlib>=3.1.0' pytest pytest-cov pytest-django pytest-mock pytest-xdist requests pid=1905
.pkg: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.12.0/x64/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.12.0.final.0-64, exe=/opt/hostedtoolcache/Python/3.12.0/x64/bin/python, platform=linux, version='3.12.0 (main, Oct  2 2023, 15:16:58) [GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
.pkg: create virtual environment via CPython3Posix(dest=/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False)
.pkg: add seed packages via FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
.pkg: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: exit 0 (2.63 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'setuptools>=40.8.0' wheel pid=1918
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.16 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.04 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.03 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: exit 0 (0.62 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install wheel pid=1928
.pkg: freeze> python -m pip freeze --all
.pkg: exit 0 (0.40 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1935
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.3
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.05 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.11 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
py312-dj50: install_package_deps> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0'
py312-dj50: exit 0 (0.81 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install 'django!=4.0.0,>=3.2' 'jwcrypto>=0.8.0' 'oauthlib>=3.1.0' 'requests>=2.13.0' pid=1938
py312-dj50: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz
py312-dj50: exit 0 (3.30 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -I -m pip install --force-reinstall --no-deps /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/.tmp/package/1/django-oauth-toolkit-2.3.0.tar.gz pid=1945
py312-dj50: freeze> python -m pip freeze --all
py312-dj50: exit 0 (0.44 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python -m pip freeze --all pid=1960
py312-dj50: asgiref==3.7.2,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.2,coverage==7.3.2,cryptography==41.0.5,Deprecated==1.2.14,Django==5.0b1,django-oauth-toolkit==2.3.0,djangorestframework==3.14.0,execnet==2.0.2,idna==3.4,iniconfig==2.0.0,jwcrypto==1.5.0,oauthlib==3.2.2,packaging==23.2,pip==23.3.1,pluggy==1.3.0,pycparser==2.21,pytest==7.4.3,pytest-cov==4.1.0,pytest-django==4.7.0,pytest-mock==3.12.0,pytest-xdist==3.4.0,pytz==2023.3.post1,requests==2.31.0,sqlparse==0.4.4,urllib3==2.0.7,wrapt==1.16.0
##[group]tox: py312-dj50
py312-dj50: commands[0]> pytest
============================= test session starts ==============================
platform linux -- Python 3.12.0, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/py312-dj50/.pytest_cache
django: version: 5.0b1, settings: tests.settings (from env)
rootdir: /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
configfile: tox.ini
plugins: django-4.7.0, mock-3.12.0, cov-4.1.0, xdist-3.4.0
collected 447 items

tests/test_application_views.py ......
tests/test_auth_backends.py ..............
tests/test_authorization_code.py ..................................................................
tests/test_client_credential.py .......
tests/test_commands.py New application OTs2kcg7aDtIo4eermdAD79LYD1ZoAmF8XSmvRzn created successfully.
client_secret: Vfq8711rP2oi8ESVApgNTixX2h2Q3SBMoij3IlD9nwQ0JnkDgVZwomBtKN6rKhHeeg0RImwfKaozSFW9UUFnkYSRjYH4ikJuwtV63q27X4HMD7jegbL9alZn16PTHAeT
.New application 87wCYqhPJSAXZqSYspVmIujA8SBWHsHBzkiZGDza created successfully.
client_secret: xOdhn9wHtBI7l2pDyiFaILa06CFbKyXByTgBCpJC6gkNLeT0fkILkJrXHgvmcpcITdsB3lQk71CDGyuLmVB5Ad37dO4xNlnZ7l80SKMGZGG8eueVhawUQwsunrIchi4X
.New application someId created successfully.
client_secret: t6ad2GUQc4HlDCDgnTWLj2Xf5ulsWmz7pr3DMtu89VwhpboLI8iWoJ0uQjBFc9GQjURlzvkLEelxFACUUe0WYaehXkNNjoEPnizBKZzYS6ybIYCSZgo62jh1HrmMgF5P
.New application XcOvfbLNpd4KkzoCFtCjcoXOU5V9vELFTpzm6vHS created successfully.
.New application TEST created successfully.
client_secret: pC8utH6aTBnF1GOLsA84J2tAFzfXKpqgFIjxaKkOmA776PmBTKZlC9qW3FfAhvn6G7d818mRWlZPetTZBsLPAD4qRqdyEzbSH1boCBs5IbKZu6cYNASZrgie4NOpodL7
.New application BUFvx1utgOLksuhZh9D5nUgNWzGDOCoKvUNVyTAO created successfully.
client_secret: WGI3GjGY5f2hTYkvi3GLmUAy83JoPRRYHazI8xwPmL5b9x3TbFzzSzgl8G4YsAh6r36lkNmKrzkwrUgml12nrImLGxs5tpaPHnrsNcEZcV2nkOW5DTbNnY16JioNchbe
..New application 9Btab6mFEMRhzQySNTuHVFnYw6c1gWMCLdnqk1ou created successfully.
client_secret: dlNr83FyZY6ydDj2tFq2xdZuFwP53fnT06mAMUx6N8bHN5ct8IwU2aGizgzHIUABmrRK71plp8Xn8IOV1lPQLfw5ehNAdpzmFHpAhJf7iaMHaisvrLtZLVBBdMfvg8LY
...
tests/test_decorators.py ...
tests/test_generator.py ...
tests/test_hybrid.py ....................................................
tests/test_implicit.py ..................
tests/test_introspection_auth.py ......
tests/test_introspection_view.py ..............
tests/test_mixins.py ........
tests/test_models.py ..................................
tests/test_oauth2_backends.py ..........
tests/test_oauth2_validators.py ....
tests/test_oidc_views.py ...FF......................................
tests/test_password.py ...
tests/test_rest_framework.py ..............................
tests/test_scopes.py ............
tests/test_settings.py ...........
tests/test_token_endpoint_cors.py ....
tests/test_token_revocation.py .......
tests/test_token_view.py ..........
tests/test_validators.py .............
tests/test_oauth2_validators.py .............................
tests/test_mixins.py ......
tests/test_oauth2_backends.py .....
tests/test_oauth2_validators.py FF..
tests/test_oidc_views.py .
tests/test_scopes_backend.py ..
tests/test_settings.py ......F.F..
tests/test_utils.py .

=================================== FAILURES ===================================
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url>

    def test_get_connect_discovery_info_without_issuer_url(self):
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
        expected_response = {
            "issuer": "http://testserver/o",
            "authorization_endpoint": "http://testserver/o/authorize/",
            "token_endpoint": "http://testserver/o/token/",
            "userinfo_endpoint": "http://testserver/o/userinfo/",
            "jwks_uri": "http://testserver/o/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...server/', ...} == {'authorizati...erver/o', ...}
E         Omitting 10 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:140: AssertionError
_ TestConnectDiscoveryInfoView.test_get_connect_discovery_info_without_issuer_url_with_rp_logout _

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>

    def test_get_connect_discovery_info_without_issuer_url_with_rp_logout(self):
        self.oauth2_settings.OIDC_RP_INITIATED_LOGOUT_ENABLED = True
        self.oauth2_settings.OIDC_ISS_ENDPOINT = None
        self.oauth2_settings.OIDC_USERINFO_ENDPOINT = None
>       self.expect_json_response_with_rp_logout("http://testserver/o")

tests/test_oidc_views.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.test_oidc_views.TestConnectDiscoveryInfoView testMethod=test_get_connect_discovery_info_without_issuer_url_with_rp_logout>
base = 'http://testserver/o'

    def expect_json_response_with_rp_logout(self, base):
        expected_response = {
            "issuer": f"{base}",
            "authorization_endpoint": f"{base}/authorize/",
            "token_endpoint": f"{base}/token/",
            "userinfo_endpoint": f"{base}/userinfo/",
            "jwks_uri": f"{base}/.well-known/jwks.json",
            "scopes_supported": ["read", "write", "openid"],
            "response_types_supported": [
                "code",
                "token",
                "id_token",
                "id_token token",
                "code token",
                "code id_token",
                "code id_token token",
            ],
            "subject_types_supported": ["public"],
            "id_token_signing_alg_values_supported": ["RS256", "HS256"],
            "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
            "claims_supported": ["sub"],
            "end_session_endpoint": f"{base}/logout/",
        }
        response = self.client.get(reverse("oauth2_provider:oidc-connect-discovery-info"))
        self.assertEqual(response.status_code, 200)
>       assert response.json() == expected_response
E       AssertionError: assert {'authorizati...'HS256'], ...} == {'authorizati...'HS256'], ...}
E         Omitting 11 identical items, use -vv to show
E         Differing items:
E         {'issuer': 'http://testserver/'} != {'issuer': 'http://testserver/o'}
E         Use -v to get more diff

tests/test_oidc_views.py:108: AssertionError
________________________ test_oidc_endpoint_generation _________________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7ffb5406cb30>
rf = <django.test.client.RequestFactory object at 0x7ffb5409cf80>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation(oauth2_settings, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/")
        request = Request("/", headers=django_request.META)
        validator = OAuth2Validator()
        oidc_issuer_endpoint = validator.get_oidc_issuer_endpoint(request)
>       assert oidc_issuer_endpoint == "http://testserver/o"
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_oauth2_validators.py:508: AssertionError
______________________ test_oidc_endpoint_generation_ssl _______________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7ffb540707a0>
rf = <django.test.client.RequestFactory object at 0x7ffb54071cd0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7ffb54070fe0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    def test_oidc_endpoint_generation_ssl(oauth2_settings, rf, settings):
        oauth2_settings.OIDC_ISS_ENDPOINT = ""
        django_request = rf.get("/", secure=True)
        # Calling the settings method with a django https request should generate a https url
        oidc_issuer_endpoint = oauth2_settings.oidc_issuer(django_request)
>       assert oidc_issuer_endpoint == "https://testserver/o"
E       AssertionError: assert 'https://testserver/' == 'https://testserver/o'
E         - https://testserver/o
E         ?                    -
E         + https://testserver/

tests/test_oauth2_validators.py:517: AssertionError
__________________ test_generating_iss_endpoint[django-None] ___________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7ffb5406f7a0>
issuer_setting = None, request_type = 'django'
rf = <django.test.client.RequestFactory object at 0x7ffb5406e8d0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
_________________ test_generating_iss_endpoint[oauthlib-None] __________________

oauth2_settings = <tests.conftest.OAuthSettingsWrapper object at 0x7ffb5406f320>
issuer_setting = None, request_type = 'oauthlib'
rf = <django.test.client.RequestFactory object at 0x7ffb5406d4c0>

    @pytest.mark.oauth2_settings(presets.OIDC_SETTINGS_RW)
    @pytest.mark.parametrize("issuer_setting", ["http://foo.com/", None])
    @pytest.mark.parametrize("request_type", ["django", "oauthlib"])
    def test_generating_iss_endpoint(oauth2_settings, issuer_setting, request_type, rf):
        oauth2_settings.OIDC_ISS_ENDPOINT = issuer_setting
        if request_type == "django":
            request = rf.get("/")
        elif request_type == "oauthlib":
            request = Request("/", headers=rf.get("/").META)
        expected = issuer_setting or "http://testserver/o"
>       assert oauth2_settings.oidc_issuer(request) == expected
E       AssertionError: assert 'http://testserver/' == 'http://testserver/o'
E         - http://testserver/o
E         ?                   -
E         + http://testserver/

tests/test_settings.py:161: AssertionError
=============================== warnings summary ===============================
tests/test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_authorization_code.py:1710: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_get_resource
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_get_token_from_authentication_server_existing_token
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_get_token_from_authentication_server_expires_timezone
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_post_resource
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_validate_bearer_token
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_validate_bearer_token
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_validate_bearer_token
tests/test_introspection_auth.py::TestTokenIntrospectionAuth::test_validate_bearer_token
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/oauth2_validators.py:396: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    expires = datetime.utcfromtimestamp(content["exp"])

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:535: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "RSA"

tests/test_models.py::test_application_key
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/tests/test_models.py:546: DeprecationWarning: Call to deprecated function (or staticmethod) key_type.
    assert key.key_type == "oct"

tests/test_oidc_views.py: 26 warnings
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/views/oidc.py:229: DeprecationWarning: This method is deprecated and will be removed in version 2.5.0.
    warnings.warn("This method is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_bad_uris
tests/test_validators.py::TestValidators::test_validate_custom_uri_scheme
tests/test_validators.py::TestValidators::test_validate_good_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:24: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

tests/test_validators.py::TestValidators::test_validate_wildcard_scheme__bad_uris
tests/test_validators.py::TestValidators::test_validate_wildcard_scheme_good_uris
  /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/oauth2_provider/validators.py:107: DeprecationWarning: This class is deprecated and will be removed in version 2.5.0.
    warnings.warn("This class is deprecated and will be removed in version 2.5.0.", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url
FAILED tests/test_oidc_views.py::TestConnectDiscoveryInfoView::test_get_connect_discovery_info_without_issuer_url_with_rp_logout
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation - Asser...
FAILED tests/test_oauth2_validators.py::test_oidc_endpoint_generation_ssl - A...
FAILED tests/test_settings.py::test_generating_iss_endpoint[django-None] - As...
FAILED tests/test_settings.py::test_generating_iss_endpoint[oauthlib-None] - ...
============ 6 failed, 441 passed, 44 warnings in 344.84s (0:05:44) ============
py312-dj50: exit 1 (347.07 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> pytest pid=1967
##[endgroup]
.pkg: _exit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /home/runner/work/django-oauth-toolkit/django-oauth-toolkit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=1925
  py312-dj50: FAIL code 1 (364.51=setup[17.43]+cmd[347.07] seconds)
  evaluation failed :( (364.60 seconds)
##[error]Process completed with exit code 1.


Changed files:
CHANGELOG.md
oauth2_provider/settings.py
oauth2_provider/urls.py

Fix diff:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e084b8..67bf633 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 * #1284 Allow to logout with no id_token_hint even if the browser session already expired
 * #1296 Added reverse function in migration 0006_alter_application_client_secret
 * #1336 Fix encapsulation for Redirect URI scheme validation
-* #1363 Fix /.well-known/openid-configuration is redirected to /.well-known/openid-configuration/
 
 ### Removed
 * #1350 Remove support for Python 3.7 and Django 2.2
diff --git a/oauth2_provider/settings.py b/oauth2_provider/settings.py
index c5af9eb..552de8e 100644
--- a/oauth2_provider/settings.py
+++ b/oauth2_provider/settings.py
@@ -295,7 +295,12 @@ class OAuth2ProviderSettings:
         else:
             raise TypeError("request must be a django or oauthlib request: got %r" % request)
         abs_url = django_request.build_absolute_uri(reverse("oauth2_provider:oidc-connect-discovery-info"))
-        return abs_url[: -len("/.well-known/openid-configuration/")]
+        if abs_url.endswith("/"):
+            # this is a deprecated URL kept for backward compatibility with old DOT versions
+            # that used / as a default.
+            return abs_url[: -len("/.well-known/openid-configuration/")]
+        else:
+            return abs_url[: -len("/.well-known/openid-configuration")]
 
 
 oauth2_settings = OAuth2ProviderSettings(USER_SETTINGS, DEFAULTS, IMPORT_STRINGS, MANDATORY)
diff --git a/oauth2_provider/urls.py b/oauth2_provider/urls.py
index 07365ab..cc0ec25 100644
--- a/oauth2_provider/urls.py
+++ b/oauth2_provider/urls.py
@@ -31,18 +31,15 @@ management_urlpatterns = [
 ]
 
 oidc_urlpatterns = [
+    # .well-known/openid-configuration/ is deprecated
+    # https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig does not specify a trailing slash
+    # Support for trailing slash should shall be removed in a future release.
+    # oauth2_provider.settings.OAuth2ProviderSettings.oidc_issuer should be updated when support for trailing slash is removed.
     re_path(
-        r"^\.well-known/openid-configuration$",
+        r"^\.well-known/openid-configuration/?$",
         views.ConnectDiscoveryInfoView.as_view(),
         name="oidc-connect-discovery-info",
     ),
-    # this endpoint is deprecated. It is kept for backward compatibility with earlier releases of DOT
-    # which used a trailing slash.
-    re_path(
-        r"^\.well-known/openid-configuration/$",
-        views.ConnectDiscoveryInfoView.as_view(),
-        name="oidc-connect-discovery-info-deprecated",
-    ),
     re_path(r"^\.well-known/jwks.json$", views.JwksInfoView.as_view(), name="jwks-info"),
     re_path(r"^userinfo/$", views.UserInfoView.as_view(), name="user-info"),
     re_path(r"^logout/$", views.RPInitiatedLogoutView.as_view(), name="rp-initiated-logout"),