-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
f4318ee
commit 7c5c431
Showing
4 changed files
with
15 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +0,0 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="function") | ||
def bypass_login(monkeypatch, test_apply_user): | ||
"""Overrides the get_user function to always return the staff user without authentication. | ||
Effectively bypasses the login process for all frontend tests. | ||
""" | ||
|
||
def patched_get_user(request): | ||
return test_apply_user | ||
|
||
monkeypatch.setattr("django.contrib.auth.get_user", patched_get_user) | ||
|
||
yield | ||
Empty file.
This file was deleted.
Oops, something went wrong.