Skip to content

Fix failing middleware tests after APDA board login check introduction#508

Draft
Copilot wants to merge 2 commits intoboard-loginfrom
copilot/sub-pr-504
Draft

Fix failing middleware tests after APDA board login check introduction#508
Copilot wants to merge 2 commits intoboard-loginfrom
copilot/sub-pr-504

Conversation

Copy link
Contributor

Copilot AI commented Mar 22, 2026

The Login middleware gained an is_authenticated check for APDA board access control, but two tests in test_return_to.py used minimal mock users with only is_anonymous: False, causing AttributeError on request.user.is_authenticated.

Change

Added is_authenticated: False to the mock user objects in the two affected tests:

# Before
request.user = type("User", (), {"is_anonymous": False})()

# After
request.user = type("User", (), {"is_anonymous": False, "is_authenticated": False})()

This lets the APDA board check short-circuit cleanly while preserving the original intent of the tests (validating _return_to session storage logic).


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copy link
Contributor Author

Copilot AI commented Mar 22, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix separate login level for APDA board Fix failing middleware tests after APDA board login check introduction Mar 22, 2026
Copilot AI requested a review from JoeyRubas March 22, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants