1313
1414
1515@pytest .mark .parallel
16+ @pytest .mark .skipif (
17+ "rest_framework.authentication.BasicAuthentication"
18+ not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
19+ reason = "Test can't run unless BasicAuthentication is enabled" ,
20+ )
1621def test_base_auth_success (pulpcore_bindings , pulp_admin_user ):
1722 """Perform HTTP basic authentication with valid credentials.
1823
@@ -33,6 +38,11 @@ def test_base_auth_success(pulpcore_bindings, pulp_admin_user):
3338
3439
3540@pytest .mark .parallel
41+ @pytest .mark .skipif (
42+ "rest_framework.authentication.BasicAuthentication"
43+ not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
44+ reason = "Test can't run unless BasicAuthentication is enabled" ,
45+ )
3646def test_base_auth_failure (pulpcore_bindings , invalid_user ):
3747 """Perform HTTP basic authentication with invalid credentials.
3848
@@ -50,6 +60,11 @@ def test_base_auth_failure(pulpcore_bindings, invalid_user):
5060
5161
5262@pytest .mark .parallel
63+ @pytest .mark .skipif (
64+ "rest_framework.authentication.BasicAuthentication"
65+ not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
66+ reason = "Test can't run unless BasicAuthentication is enabled" ,
67+ )
5368def test_base_auth_required (pulpcore_bindings , anonymous_user ):
5469 """Perform HTTP basic authentication with no credentials.
5570
@@ -69,7 +84,7 @@ def test_base_auth_required(pulpcore_bindings, anonymous_user):
6984@pytest .mark .parallel
7085@pytest .mark .skipif (
7186 "django.contrib.auth.backends.RemoteUserBackend" not in settings .AUTHENTICATION_BACKENDS
72- and "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
87+ or "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
7388 not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
7489 reason = "Test can't run unless RemoteUserBackend and JSONHeaderRemoteAuthentication are enabled" ,
7590)
@@ -98,7 +113,7 @@ def test_jq_header_remote_auth(pulpcore_bindings, anonymous_user):
98113@pytest .mark .parallel
99114@pytest .mark .skipif (
100115 "django.contrib.auth.backends.RemoteUserBackend" not in settings .AUTHENTICATION_BACKENDS
101- and "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
116+ or "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
102117 not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
103118 reason = "Test can't run unless RemoteUserBackend and JSONHeaderRemoteAuthentication are enabled" ,
104119)
@@ -127,7 +142,7 @@ def test_jq_header_remote_auth_denied_by_wrong_header(pulpcore_bindings, anonymo
127142@pytest .mark .parallel
128143@pytest .mark .skipif (
129144 "django.contrib.auth.backends.RemoteUserBackend" not in settings .AUTHENTICATION_BACKENDS
130- and "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
145+ or "pulpcore.app.authentication.JSONHeaderRemoteAuthentication"
131146 not in settings .REST_FRAMEWORK ["DEFAULT_AUTHENTICATION_CLASSES" ],
132147 reason = "Test can't run unless RemoteUserBackend and JSONHeaderRemoteAuthentication are enabled" ,
133148)
0 commit comments