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] Send data via JSON in call
#8
Conversation
dae5c3e
to
390dda4
Compare
Current coverage is 100% (diff: 100%)@@ master #8 diff @@
===================================
Files 4 4
Lines 85 86 +1
Methods 0 0
Messages 0 0
Branches 3 3
===================================
+ Hits 85 86 +1
Misses 0 0
Partials 0 0
|
Coverage remained the same at 100.0% when pulling 390dda4b32c5a0a36d49876af807e4989677cd1b on bugfix/master/response-parse into d53fe77 on master. |
390dda4
to
34107fb
Compare
34107fb
to
8b94611
Compare
Rebased to fix conflicts; ready for review |
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.
Minor suggestion. Otherwise, LGTM! 👍
'Name': self.name, | ||
'Password': self.password, | ||
}) | ||
if data is None: |
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.
Why not save two lines by setting the default of data to {}
in the method declaration?
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.
We have a lint check to prevent this, but here is a little lesson in mutability 😉 :
>>> def test(key, val, map={}):
... map[key] = val
... print map
...
>>> test('a', 'a-val')
{'a': 'a-val'}
>>> test('b', 'b-val')
{'a': 'a-val', 'b': 'b-val'}
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.
Derppppp! I totally forgot about that. The worst part is, I think this bit one of us in the butt with a project way back when.
No description provided.