Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getCookie implementation in test classes #88

Merged
merged 1 commit into from Mar 19, 2019

Conversation

Projects
None yet
2 participants
@bjudson
Copy link
Contributor

commented Mar 19, 2019

getCookie method included with many of the test suite classes pulls the first item from the dict returned by parse_cookie(). In versions of Python where the dict is not ordered (<=3.5), this may return the session cookie rather than the CSRF token cookie, causing tests to fail. This change to getCookie ensures that the tests don't rely on parse_cookie returned an ordered dict.

Addresses #86

@bjudson bjudson force-pushed the TheNounProject:fix-getcookie branch from d0e395f to a69d412 Mar 19, 2019

bjudson added a commit to TheNounProject/flask-seasurf that referenced this pull request Mar 19, 2019

Fix getCookie implementation in test classes
getCookie method included with many of the test suite classes pulls the first item from the dict returned by parse_cookie(). In versions of Python where the dict is not ordered (<=3.5), this may return the session cookie rather than the CSRF token cookie, causing tests to fail. This change to getCookie ensures that the tests don't rely on parse_cookie returned an ordered dict.

Addresses maxcountryman#88
Fix getCookie implementation in test classes
getCookie method included with many of the test suite classes pulls the first item from the dict returned by parse_cookie(). In versions of Python where the dict is not ordered (<=3.5), this may return the session cookie rather than the CSRF token cookie, causing tests to fail. This change to getCookie ensures that the tests don't rely on parse_cookie returned an ordered dict.

Addresses #86

@bjudson bjudson force-pushed the TheNounProject:fix-getcookie branch from a69d412 to 4ec08be Mar 19, 2019

@maxcountryman

This comment has been minimized.

Copy link
Owner

commented Mar 19, 2019

Nice!

@maxcountryman maxcountryman merged commit fe349a6 into maxcountryman:master Mar 19, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bjudson bjudson deleted the TheNounProject:fix-getcookie branch Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.