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
remove special code for python 2.7 (six.PY2) #3485
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3485 +/- ##
=======================================
Coverage 95.78% 95.78%
=======================================
Files 170 170
Lines 23137 23131 -6
=======================================
- Hits 22161 22157 -4
+ Misses 976 974 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tests/test_api_auth.py
Outdated
if six.PY2: | ||
expected = "The user User(login=u'cornelius@unknown', " \ | ||
"realm=u'realm1', resolver='') exists in NO resolver." | ||
else: | ||
expected = "The user User(login='cornelius@unknown', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the init of the line, please
like this
with self.app.test_request_context('/auth',
method='POST',
data={"username": "cornelius@unknown",
"realm": "realm1",
"password": "test"}):
res = self.app.full_dispatch_request()
self.assertEqual(401, res.status_code, res)
result = res.json.get("result")
self.assertFalse(result.get("status"), result)
expected = "The user User(login='cornelius@unknown', " \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
tests/test_api_auth.py
Outdated
if six.PY2: | ||
expected = "The user User(login=u'selfservice', " \ | ||
"realm=u'realm3', resolver='') exists in NO resolver." | ||
else: | ||
expected = "The user User(login='selfservice', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
tests/test_api_auth.py
Outdated
if six.PY2: | ||
expected = "The user User(login=u'cornelius@realm1', " \ | ||
"realm=u'realm1', resolver='') exists in NO resolver." | ||
else: | ||
expected = "The user User(login='cornelius@realm1', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
tests/test_api_auth.py
Outdated
if six.PY2: | ||
expected = "The user User(login=u'cornelius@unknown', " \ | ||
"realm=u'realm1', resolver='') exists in NO resolver." | ||
else: | ||
expected = "The user User(login='cornelius@unknown', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
tests/test_api_auth.py
Outdated
if six.PY2: | ||
expected = "The user User(login=u'selfservice@realm3', " \ | ||
"realm=u'realm1', resolver='') exists in NO resolver." | ||
else: | ||
expected = "The user User(login='selfservice@realm3', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
tests/test_api_auth.py
Outdated
expected = "The user User(login=u'selfservice@realm1', " \ | ||
"realm=u'realm3', resolver='') exists in NO resolver." | ||
else: | ||
# the realm will be split from the login name | ||
expected = "The user User(login='selfservice@realm1', " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a1e752d.
working on #2128.