aboutsummaryrefslogtreecommitdiff
path: root/tests/test_pandora/test_transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pandora/test_transport.py')
-rw-r--r--tests/test_pandora/test_transport.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/test_pandora/test_transport.py b/tests/test_pandora/test_transport.py
index 862a12f..96dd40e 100644
--- a/tests/test_pandora/test_transport.py
+++ b/tests/test_pandora/test_transport.py
@@ -281,26 +281,6 @@ class TestPurePythonBlowfishCryptor(TestCase, CommonCryptorTestCases):
281 self.cryptor.cipher = self.cipher 281 self.cryptor.cipher = self.cipher
282 282
283 283
284class TestCryptographyBlowfish(TestCase, CommonCryptorTestCases):
285
286 class FakeCipher(object):
287
288 def update_into(self, val, buf):
289 for i, v in enumerate(val):
290 buf[i] = v
291 return len(val)
292
293 def finalize(self):
294 return b""
295
296 def setUp(self):
297 self.cipher = Mock()
298 self.cipher.encryptor.return_value = self.FakeCipher()
299 self.cipher.decryptor.return_value = self.FakeCipher()
300 self.cryptor = t.CryptographyBlowfish("keys")
301 self.cryptor.cipher = self.cipher
302
303
304class TestEncryptor(TestCase): 284class TestEncryptor(TestCase):
305 285
306 ENCODED_JSON = "7b22666f6f223a22626172227d" 286 ENCODED_JSON = "7b22666f6f223a22626172227d"
@@ -335,14 +315,3 @@ class TestEncryptor(TestCase):
335 self.assertEqual( 315 self.assertEqual(
336 self.EXPECTED_TIME, 316 self.EXPECTED_TIME,
337 self.cryptor.decrypt_sync_time(self.ENCODED_TIME)) 317 self.cryptor.decrypt_sync_time(self.ENCODED_TIME))
338
339
340class TestDefaultStrategy(TestCase):
341
342 def test_blowfish_not_available(self):
343 del sys.modules["pandora.transport"]
344 sys.modules["blowfish"] = None
345
346 import pandora.transport as t
347 self.assertIsNone(t.blowfish)
348 self.assertIs(t._default_crypto, t.CryptographyBlowfish)