20
20
21
21
from . import presets
22
22
from .common_testing import OAuth2ProviderTestCase as TestCase
23
- from .common_testing import test_database_names
24
23
25
24
26
25
CLEARTEXT_SECRET = "1234567890abcdefghijklmnopqrstuvwxyz"
@@ -467,7 +466,7 @@ def test_clear_expired_tokens_with_tokens(self):
467
466
assert remaining_gt_count == initial_gt_count // 2 , "half the remaining grants should still exist."
468
467
469
468
470
- @pytest .mark .django_db ( databases = test_database_names )
469
+ @pytest .mark .django_db
471
470
@pytest .mark .oauth2_settings (presets .OIDC_SETTINGS_RW )
472
471
def test_id_token_methods (oidc_tokens , rf ):
473
472
id_token = IDToken .objects .get ()
@@ -502,7 +501,7 @@ def test_id_token_methods(oidc_tokens, rf):
502
501
assert IDToken .objects .filter (jti = id_token .jti ).count () == 0
503
502
504
503
505
- @pytest .mark .django_db ( databases = test_database_names )
504
+ @pytest .mark .django_db
506
505
@pytest .mark .oauth2_settings (presets .OIDC_SETTINGS_RW )
507
506
def test_clear_expired_id_tokens (oauth2_settings , oidc_tokens , rf ):
508
507
id_token = IDToken .objects .get ()
@@ -541,7 +540,7 @@ def test_clear_expired_id_tokens(oauth2_settings, oidc_tokens, rf):
541
540
assert not IDToken .objects .filter (jti = id_token .jti ).exists ()
542
541
543
542
544
- @pytest .mark .django_db ( databases = test_database_names )
543
+ @pytest .mark .django_db
545
544
@pytest .mark .oauth2_settings (presets .OIDC_SETTINGS_RW )
546
545
def test_application_key (oauth2_settings , application ):
547
546
# RS256 key
@@ -566,7 +565,7 @@ def test_application_key(oauth2_settings, application):
566
565
assert "This application does not support signed tokens" == str (exc .value )
567
566
568
567
569
- @pytest .mark .django_db ( databases = test_database_names )
568
+ @pytest .mark .django_db
570
569
@pytest .mark .oauth2_settings (presets .OIDC_SETTINGS_RW )
571
570
def test_application_clean (oauth2_settings , application ):
572
571
# RS256, RSA key is configured
@@ -606,15 +605,15 @@ def test_application_clean(oauth2_settings, application):
606
605
application .clean ()
607
606
608
607
609
- @pytest .mark .django_db ( databases = test_database_names )
608
+ @pytest .mark .django_db
610
609
@pytest .mark .oauth2_settings (presets .ALLOWED_SCHEMES_DEFAULT )
611
610
def test_application_origin_allowed_default_https (oauth2_settings , cors_application ):
612
611
"""Test that http schemes are not allowed because ALLOWED_SCHEMES allows only https"""
613
612
assert cors_application .origin_allowed ("https://example.com" )
614
613
assert not cors_application .origin_allowed ("http://example.com" )
615
614
616
615
617
- @pytest .mark .django_db ( databases = test_database_names )
616
+ @pytest .mark .django_db
618
617
@pytest .mark .oauth2_settings (presets .ALLOWED_SCHEMES_HTTP )
619
618
def test_application_origin_allowed_http (oauth2_settings , cors_application ):
620
619
"""Test that http schemes are allowed because http was added to ALLOWED_SCHEMES"""
0 commit comments