Skip to content

Commit

Permalink
[18.0][MIG] auth_saml: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BT-dlagin committed Jan 14, 2025
1 parent 8901bd6 commit 53b126d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions auth_saml/tests/test_pysaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,3 @@ def test_access_denied_redirect(self):
response = self.url_open("/auth_saml/signin", allow_redirects=False)
self.assertEqual(response.status_code, 303)
self.assertIn("/web/login?saml_error=expired", response.headers["Location"])

def test_generic_exception_redirect(self):
"""Test that a generic exception leads to the correct redirect."""
with patch("odoo.http.request.env") as mock_env:
mock_env["res.users"].auth_saml.side_effect = Exception("Generic error")
response = self.url_open("/auth_saml/signin", allow_redirects=False)
self.assertEqual(response.status_code, 303)
self.assertIn("/web/login?saml_error=access-denied", response.headers["Location"])

0 comments on commit 53b126d

Please sign in to comment.