Skip to content

Commit cdc66aa

Browse files
committed
Clean up extraneous whitespace
1 parent 03355a1 commit cdc66aa

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

pusher/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
if sys.version_info < (3,):
2727
byte_type = 'a python2 str'
2828
else:
29-
byte_type = 'a python3 bytes'
29+
byte_type = 'a python3 bytes'
3030

3131
def ensure_text(obj, name):
3232
if isinstance(obj, six.text_type):

pusher_tests/test_crypto.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
class TestCrypto(unittest.TestCase):
1111

12-
1312
def test_is_encrypted_channel(self):
1413
# testcases matrix with inputs and expected returning values
1514
testcases = [
@@ -32,9 +31,8 @@ def test_is_encrypted_channel(self):
3231
crypto.is_encrypted_channel( t["input"] ),
3332
t["expected"]
3433
)
35-
36-
def test_is_encryption_master_key_valid(self):
3734

35+
def test_is_encryption_master_key_valid(self):
3836
testcases = [
3937
{ "input":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expected":True },
4038
{ "input":" ", "expected":True },
@@ -49,9 +47,8 @@ def test_is_encryption_master_key_valid(self):
4947
crypto.is_encryption_master_key_valid( t["input"] ),
5048
t["expected"]
5149
)
52-
50+
5351
def test_generate_shared_secret(self):
54-
5552
testcases = [
5653
{
5754
"input": ["pvUPIk0YG6MnxCEMIUUVFrbDmQwbhICXUcy",
@@ -66,7 +63,7 @@ def test_generate_shared_secret(self):
6663
crypto.generate_shared_secret( ensure_binary(t["input"][0],'t["input"][0]'), ensure_binary(t["input"][1],'t["input"][1]') ),
6764
t["expected"]
6865
)
69-
66+
7067
def test_encrypt(self):
7168
testcases = [
7269
{
@@ -95,6 +92,6 @@ def test_encrypt(self):
9592
),
9693
t["expected"]
9794
)
98-
95+
9996
def test_decrypt(self):
10097
self.assertEqual(True, True)

pusher_tests/test_pusher_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_trigger_batch_with_mixed_channels_success_case(self):
162162
)
163163

164164
# simulate the same encryption process and check equality
165-
encryp_master_key = ensure_binary(encryp_master_key,"encryp_master_key")
165+
encryp_master_key = ensure_binary(encryp_master_key, "encryp_master_key")
166166
chan_2 = ensure_binary(chan_2,"chan_2")
167167
shared_secret = generate_shared_secret(chan_2, encryp_master_key)
168168

@@ -180,7 +180,7 @@ def test_trigger_batch_with_mixed_channels_success_case(self):
180180
cipher_text_b64 = base64.b64encode(cipher_text)
181181

182182
# format expected output
183-
json_dumped_2 = json.dumps({ "nonce" : nonce_b64.decode("utf-8"), "ciphertext": cipher_text_b64.decode("utf-8") } , ensure_ascii=False)
183+
json_dumped_2 = json.dumps({ "nonce" : nonce_b64.decode("utf-8"), "ciphertext": cipher_text_b64.decode("utf-8") }, ensure_ascii=False)
184184

185185
expected_params = {
186186
u'batch': [{
@@ -198,7 +198,6 @@ def test_trigger_batch_with_mixed_channels_success_case(self):
198198
self.assertEqual(request.params, expected_params)
199199

200200
def test_trigger_with_private_encrypted_channel_string_fail_case_no_encryption_master_key_specified(self):
201-
202201
pc = PusherClient(app_id=u'4', key=u'key', secret=u'secret', ssl=True)
203202

204203
with self.assertRaises(ValueError):
@@ -222,7 +221,6 @@ def test_trigger_with_public_channel_with_encryption_master_key_specified_succes
222221
self.assertEqual(request.params, expected_params)
223222

224223
def test_trigger_with_private_encrypted_channel_success(self):
225-
226224
# instantiate a new client configured with the master encryption key
227225
encryp_master_key=u'8tW5FQLniQ1sBQFwrw7t6TVEsJZd10yY'
228226
pc = PusherClient(app_id=u'4', key=u'key', secret=u'secret', encryption_master_key=encryp_master_key, ssl=True)

0 commit comments

Comments
 (0)