12345678910111213141516171819202122 |
- import sys
- from unittest import TestCase
- from django_sso_tests import mock_django_auth_views
- from django_sso.middleware.utils import get_auth_views
- sys.modules["django.contrib.auth.views"] = mock_django_auth_views
- class MiddlewareAppsInstalledTests(TestCase):
- def test_get_auth_views_login(self):
- view_func = mock_django_auth_views.LoginView.as_view
- _ = view_func()
- def test_get_auth_views_logout(self):
- view_func = mock_django_auth_views.LogoutView.as_view
- _ = view_func()
- def test_get_auth_views(self):
- _, _ = get_auth_views()
|