diff options
author | rafael lisboa <rafaelzlisboa@gmail.com> | 2015-06-10 17:01:37 -0300 |
---|---|---|
committer | rafael lisboa <rafaelzlisboa@gmail.com> | 2015-06-10 17:01:37 -0300 |
commit | 1f41801a9355ed55e50ca6f54411565a5b11b093 (patch) | |
tree | 8355d6db60b4ae16748807b0aeb29991765ba5c7 /service/test | |
parent | 031ebd58fd97bebae81e4e17cd7c4a4ed5a493d0 (diff) |
Fix bug when not passing leap certificate nor fingerprint
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/unit/bitmask_libraries/test_certs.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/service/test/unit/bitmask_libraries/test_certs.py b/service/test/unit/bitmask_libraries/test_certs.py index f1e643c4..5d447537 100644 --- a/service/test/unit/bitmask_libraries/test_certs.py +++ b/service/test/unit/bitmask_libraries/test_certs.py @@ -1,7 +1,7 @@ import unittest from pixelated.bitmask_libraries.certs import LeapCertificate -from mock import MagicMock, patch +from mock import MagicMock class CertsTest(unittest.TestCase): @@ -26,6 +26,14 @@ class CertsTest(unittest.TestCase): self.assertEqual('fingerprint', LeapCertificate.LEAP_FINGERPRINT) self.assertFalse(certs.provider_web_cert) + def test_set_cert_and_fingerprint_when_none_are_passed(self): + LeapCertificate.set_cert_and_fingerprint(None, None) + + certs = LeapCertificate(self.provider) + + self.assertIsNone(certs.LEAP_FINGERPRINT) + self.assertEqual(True, certs.provider_web_cert) + def test_provider_api_cert(self): certs = LeapCertificate(self.provider).provider_api_cert |