Fix pep8 errors
This commit is contained in:
parent
b3f8bb387c
commit
ed692794c1
|
@ -295,9 +295,9 @@ class WebPusher:
|
|||
if curl:
|
||||
return self.as_curl(endpoint, encoded_data, headers)
|
||||
return self.requests_method.post(endpoint,
|
||||
data=encoded_data,
|
||||
headers=headers,
|
||||
timeout=timeout)
|
||||
data=encoded_data,
|
||||
headers=headers,
|
||||
timeout=timeout)
|
||||
|
||||
|
||||
def webpush(subscription_info,
|
||||
|
|
|
@ -325,8 +325,10 @@ class WebpushTestCase(unittest.TestCase):
|
|||
headers = {"Crypto-Key": "pre-existing",
|
||||
"Authentication": "bearer vapid"}
|
||||
data = "Mary had a little lamb"
|
||||
WebPusher(subscription_info, requests_session=mock_session).send(data, headers)
|
||||
eq_(subscription_info.get('endpoint'), mock_session.post.call_args[0][0])
|
||||
WebPusher(subscription_info,
|
||||
requests_session=mock_session).send(data, headers)
|
||||
eq_(subscription_info.get('endpoint'),
|
||||
mock_session.post.call_args[0][0])
|
||||
pheaders = mock_session.post.call_args[1].get('headers')
|
||||
eq_(pheaders.get('ttl'), '0')
|
||||
ok_('encryption' in pheaders)
|
||||
|
|
Loading…
Reference in New Issue