-
-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Useful if you have authentication in front of wger, and want to use that instead of wgers authentication/signup methods.
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Django | ||
from django.urls import reverse | ||
|
||
# wger | ||
from wger.core.tests.base_testcase import WgerTestCase | ||
|
||
|
||
class ProxyAuthHeaderTestCase(WgerTestCase): | ||
""" | ||
Tests using proxy auth for authentication | ||
""" | ||
|
||
def test_basic_proxy_auth_header(self): | ||
""" | ||
Tests that the proxy auth header works for authenticating | ||
the user | ||
""" | ||
with self.settings( | ||
WGER_SETTINGS={ | ||
"PROXY_AUTH_HEADER": True, | ||
"ALLOW_REGISTRATION": False, | ||
"ALLOW_GUEST_USERS": False, | ||
} | ||
): | ||
response = self.client.get(reverse("core:dashboard")) | ||
self.assertEqual(response.status_code, 200) |