-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
from timed.notifications.models import Notification | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
def test_notify_changed_employments(mailoutbox, freezer): | ||
email = "[email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
from timed.employment.factories import UserFactory | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
@pytest.mark.parametrize("is_id_token", [True, False]) | ||
@pytest.mark.parametrize( | ||
("authentication_header", "error"), | ||
|
@@ -63,7 +63,7 @@ def test_authentication( | |
) | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
@pytest.mark.parametrize( | ||
("create_user", "username", "expected_count"), | ||
[(False, "", 0), (True, "", 1), (True, "[email protected]", 1)], | ||
|
@@ -90,7 +90,7 @@ def test_authentication_new_user( | |
assert user_model.objects.count() == expected_count | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
def test_authentication_update_user_data(rf, requests_mock, settings): | ||
user_model = get_user_model() | ||
user = UserFactory.create() | ||
|
@@ -114,7 +114,7 @@ def test_authentication_update_user_data(rf, requests_mock, settings): | |
assert user.email == "test@localhost" | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
def test_authentication_idp_502(rf, requests_mock, settings): | ||
requests_mock.get( | ||
settings.OIDC_OP_USER_ENDPOINT, status_code=status.HTTP_502_BAD_GATEWAY | ||
|
@@ -125,7 +125,7 @@ def test_authentication_idp_502(rf, requests_mock, settings): | |
OIDCAuthentication().authenticate(request) | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
def test_authentication_idp_missing_claim(rf, requests_mock, settings): | ||
settings.OIDC_USERNAME_CLAIM = "missing" | ||
userinfo = {"preferred_username": "1"} | ||
|
@@ -136,7 +136,7 @@ def test_authentication_idp_missing_claim(rf, requests_mock, settings): | |
OIDCAuthentication().authenticate(request) | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
def test_authentication_no_client(rf, requests_mock, settings): | ||
requests_mock.get( | ||
settings.OIDC_OP_USER_ENDPOINT, status_code=status.HTTP_401_UNAUTHORIZED | ||
|
@@ -151,7 +151,7 @@ def test_authentication_no_client(rf, requests_mock, settings): | |
OIDCAuthentication().authenticate(request) | ||
|
||
|
||
@pytest.mark.django_db() | ||
@pytest.mark.django_db | ||
@pytest.mark.parametrize("check_introspect", [True, False]) | ||
def test_userinfo_introspection_failure( | ||
client, rf, requests_mock, settings, check_introspect | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters