Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions dashboard/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sys
import types

from django.http import HttpResponse


# Creat a "fake" mozilla_django_oidc.views so that tests will run,
# even if mozilla_django_oidc is not available at import time for
# tests.

if "mozilla_django_oidc" not in sys.modules:
oidc_module = types.ModuleType("mozilla_django_oidc")
oidc_views_module = types.ModuleType("mozilla_django_oidc.views")

class _DummyOIDCView:
@classmethod
def as_view(cls):
def _view(request, *args, **kwargs):
return HttpResponse("")

return _view

oidc_views_module.OIDCAuthenticationRequestView = _DummyOIDCView
oidc_views_module.OIDCAuthenticationCallbackView = _DummyOIDCView
oidc_views_module.OIDCLogoutView = _DummyOIDCView
oidc_module.views = oidc_views_module
sys.modules["mozilla_django_oidc"] = oidc_module
sys.modules["mozilla_django_oidc.views"] = oidc_views_module
2 changes: 1 addition & 1 deletion dashboard/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Django==5.2.13
PyYAML==6.0.2
docutils==0.21.2
whitenoise==6.9.0
psycopg2-binary==2.9.10
psycopg2-binary==2.9.11
tzdata==2025.1
django-browser-reload==1.18.0
django-tinymce==4.1.0
Expand Down