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 1e1cebd commit 5a9d944
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions auth_saml/tests/test_pysaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from odoo.addons.auth_saml.controllers.main import fragment_to_query_string

from .fake_idp import DummyResponse, FakeIDP
from odoo import http


@tagged("saml", "post_install", "-at_install")
Expand Down Expand Up @@ -611,7 +610,7 @@ def test_get_cert_key_path_tempfile(self):
os.remove(cert_key_path)

def test_signin_no_relaystate_redirect(self):
"""Test that the signin method redirects to /?type=signup when RelayState is missing."""
"""Test redirect to /?type=signup when RelayState is missing."""
self.add_provider_to_user()

redirect_url = self.saml_provider._get_auth_request()
Expand All @@ -624,7 +623,7 @@ def test_signin_no_relaystate_redirect(self):
signin_response = self.url_open(
"/auth_saml/signin",
data={"SAMLResponse": response.text},
allow_redirects=False
allow_redirects=False,
)
self.assertEqual(signin_response.status_code, 303)
self.assertIn("/?type=signup", signin_response.headers["Location"])

0 comments on commit 5a9d944

Please sign in to comment.