Skip to content

py38 Test fixes, Github actions#186

Merged
peppelinux merged 2 commits intoIdentityPython:masterfrom
mhindery:github-actions
May 1, 2020
Merged

py38 Test fixes, Github actions#186
peppelinux merged 2 commits intoIdentityPython:masterfrom
mhindery:github-actions

Conversation

@mhindery
Copy link
Contributor

With a change in the tests to get them to succeed on Python 3.8

Example tests being run: https://github.com/mhindery/djangosaml2/runs/619919241?check_suite_focus=true

@mhindery
Copy link
Contributor Author

Hmm I don't really get why this is showing file changes which come from the previous MR, and are already in master 🤔

@mhindery
Copy link
Contributor Author

Allright, all clean diff now

@mhindery mhindery changed the title Github actions py38 Test fixes, Github actions Apr 29, 2020
@mhindery
Copy link
Contributor Author

mhindery commented May 1, 2020

I there anything blocking this?

Copy link
Member

@peppelinux peppelinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I there anything blocking this?

Yes, the pending review. I don't like that if.
You're a doing a great work @mhindery and I can go ahead and merge your PR as it is but I tried to ask to you if there's some alternative to that if.

Let me know, I'm available to merge this today


saml_request = params['SAMLRequest'][0]
expected_request = """<samlp:LogoutRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Destination="https://idp.example.com/simplesaml/saml2/idp/SingleLogoutService.php" ID="XXXXXXXXXXXXXXXXXXXXXX" IssueInstant="2010-01-01T00:00:00Z" Reason="" Version="2.0"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://sp.example.com/saml2/metadata/</saml:Issuer><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" SPNameQualifier="http://sp.example.com/saml2/metadata/">58bcc81ea14700f66aeb707a0eff1360</saml:NameID><samlp:SessionIndex>a0123456789abcdef0123456789abcdef</samlp:SessionIndex></samlp:LogoutRequest>"""
if PY_VERSION < (3, 8):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to not use a specialized if. Could we parse the xml in a elementtree object then dump it? It should have the same behaviour and produce the same dump struncture, with the same elements order, in each environments.

Let mw knoe, this would be the best strategy to handle this kind of problems with every future python releases

py{35,36,37,38}-django22
py{36,37,38}-django30
py{36,37,38}-djangomaster
py{3.6,3.7,3.8}-django{2.2,3.0,master}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also remove py35 in my latest commits, Yes, it's time to do that. Really agree

@peppelinux peppelinux merged commit 52f72d4 into IdentityPython:master May 1, 2020
@peppelinux
Copy link
Member

I'll review that aspect by myself, and more I'd like to refactor the unit tests because they should run without a real project setup, this should be embedded in the unit test

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.

3 participants