Skip to content

Conversation

@nikolas
Copy link
Member

@nikolas nikolas commented Oct 8, 2017

When using python 3, the saml assertion return type needs to be converted to
bytes in order to fix this error:

TypeError at /accounts/caslogin/

POST data should be bytes or an iterable of bytes. It cannot be of
type str.

Our unit tests didn't catch this because we're mocking out urlopen when this code runs, so I've added a separate unit test for get_saml_assertion() that fails without this change.

When using python 3, the saml assertion type needs to be converted to
bytes in order to fix this error:

    TypeError at /accounts/caslogin/

    POST data should be bytes or an iterable of bytes. It cannot be of
    type str.
@coveralls
Copy link

coveralls commented Oct 8, 2017

Coverage Status

Coverage increased (+0.8%) to 81.38% when pulling 64d6277 on py3-post-error into a5fdf2d on master.

@coveralls
Copy link

coveralls commented Oct 8, 2017

Coverage Status

Coverage increased (+0.8%) to 81.38% when pulling e3eaa3a on py3-post-error into a5fdf2d on master.

@sdreher sdreher merged commit e79a0f6 into master Oct 9, 2017
@sdreher sdreher deleted the py3-post-error branch October 9, 2017 16:19
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.

4 participants