Skip to content

Commit

Permalink
add print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
btylerburton committed Dec 20, 2024
1 parent a947a44 commit 7d12e2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckanext/saml2auth/tests/test_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,16 @@ def test_ckan_cookie_cleared_on_slo(self, app):
# Starting 2.10, CKAN's SessionMiddleware will append a
# new Set-cookie header on every first response from the server.
# This includes test requests.
print(f">>cookie_headers {cookie_headers}")
assert len(cookie_headers) == 2

first_cookie = cookie_headers[0]

cookie = SimpleCookie()
cookie.load(first_cookie)
cookie_name = [name for name in cookie.keys()][0]
print(f">>cookie.keys() {cookie.keys()}")
print(f">>cookie[cookie_name] {cookie[cookie_name]}")
assert cookie_name == 'ckan'
assert cookie[cookie_name]['domain'] == 'test.ckan.net'
cookie_date = date_parse(cookie[cookie_name]['expires'], ignoretz=True)
Expand Down
2 changes: 2 additions & 0 deletions ckanext/saml2auth/tests/test_blueprint_get_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def test_unsigned_request(self, app):
'SAMLResponse': encoded_response
}
response = app.post(url=url, params=data)
print(f">>response {response}")
assert 200 == response.status_code

def render_file(self, path, context, save_as=None):
Expand Down Expand Up @@ -309,6 +310,7 @@ def test_encrypted_assertion(self, app):
'SAMLResponse': encoded_response
}
response = app.post(url=url, params=data)
print(f">>response {response}")
assert 200 == response.status_code

@pytest.mark.ckan_config(u'ckanext.saml2auth.entity_id', u'urn:gov:gsa:SAML:2.0.profiles:sp:sso:test:entity')
Expand Down
4 changes: 4 additions & 0 deletions ckanext/saml2auth/tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def test_after_login_is_called(self, app):

with plugins.use_plugin("test_saml2auth") as plugin:
response = app.post(url=url, params=data, follow_redirects=False)
print(f">>plugin {plugin}")
print(f">>response {response}")
assert 302 == response.status_code

assert plugin.calls["after_saml2_login"] == 1, plugin.calls
Expand All @@ -106,6 +108,8 @@ def test_before_create_is_called(self, app):

with plugins.use_plugin("test_saml2auth") as plugin:
response = app.post(url=url, params=data, follow_redirects=False)
print(f">>plugin {plugin}")
print(f">>response {response}")
assert 302 == response.status_code

assert plugin.calls["before_saml2_user_create"] == 1, plugin.calls
Expand Down

0 comments on commit 7d12e2e

Please sign in to comment.