Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Jan 14, 2025
1 parent 543a7eb commit ff9e9ad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ckanext/saml2auth/tests/test_blueprint_get_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,19 @@ def test_unsigned_request(self, app):
data = {
'SAMLResponse': encoded_response
}
response = app.post(url=url, params=data)
try:
response = app.post(url=url, params=data)
except Exception as e:
raise Exception(
f'Error test_unsigned_request: {e}\n'
f'encoded_response: {encoded_response}\n'
f'url: {url}\n'
)

if response.status_code != 200:
assert False, f'Failed test_unsigned_request: {response.body}'
# Can't use response, too old (now=2024-07-31T17:42:38Z + slack=0 > not_on_or_after=2024-01-18T06:21:48Z

assert 200 == response.status_code

def render_file(self, path, context, save_as=None):
Expand Down

0 comments on commit ff9e9ad

Please sign in to comment.