Skip to content

Commit

Permalink
Fix: Updated test file on accountdisabledmiddleware
Browse files Browse the repository at this point in the history
Signed-off-by: RafaelJohn9 <[email protected]>
  • Loading branch information
RafaelJohn9 committed Jan 20, 2025
1 parent 3ac7caa commit 3ef5bd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pontoon/base/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def test_throttle(client, settings):
@pytest.mark.django_db
def test_AccountDisabledMiddleware(client, member, settings):
# Ensure the user is authenticated but not active
member.user.is_authenticated = True
member.user.is_active = False
member.user.save()

Expand Down
2 changes: 1 addition & 1 deletion pontoon/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ def _default_from_email():
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"pontoon.base.middleware.AccountDisabledMiddleware",
"pontoon.base.middleware.ThrottleIpMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"csp.middleware.CSPMiddleware",
"pontoon.base.middleware.EmailConsentMiddleware",
"pontoon.base.middleware.AccountDisabledMiddleware",
)

CONTEXT_PROCESSORS = (
Expand Down

0 comments on commit 3ef5bd3

Please sign in to comment.