diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2017-03-17 10:50:10 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2017-03-24 16:31:16 +0100 |
commit | 707c8373d90a2a9ed8ced2d460675ec16f7a0da0 (patch) | |
tree | 6a5b1d250f2ddbe53eb219e6cedd895e84d3fb77 /tests/test_authcookie.py | |
parent | 0ecd9cf4a93bfa443d45cf83009ec275de41cdaa (diff) | |
download | m2crypto-707c8373d90a2a9ed8ced2d460675ec16f7a0da0.tar.gz |
Remove superfluous logging and clean up comments.
This should be NOOP functionally.
Diffstat (limited to 'tests/test_authcookie.py')
-rw-r--r-- | tests/test_authcookie.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_authcookie.py b/tests/test_authcookie.py index 260dced..4879c88 100644 --- a/tests/test_authcookie.py +++ b/tests/test_authcookie.py @@ -13,7 +13,7 @@ except ImportError: from M2Crypto import EVP, Rand, util from M2Crypto.AuthCookie import AuthCookie, AuthCookieJar, mix, unmix, unmix3 -from M2Crypto.six.moves.http_cookies import SimpleCookie +from M2Crypto.six.moves.http_cookies import SimpleCookie # pylint: disable=E0611, E0401 log = logging.getLogger(__name__) @@ -43,7 +43,7 @@ class AuthCookieTestCase(unittest.TestCase): self.assertEqual(c.expiry(), self.exp) self.assertEqual(c.data(), self.data) # Peek inside the cookie jar... - key = self.jar._key + key = self.jar._key # pylint: disable=W0212 mac = util.bin_to_hex( EVP.hmac(key, util.py3bytes(mix(self.exp, self.data)), 'sha1')) self.assertEqual(c.mac(), mac) @@ -71,17 +71,17 @@ class AuthCookieTestCase(unittest.TestCase): def test_is_invalid_changed_exp(self): c = self.jar.makeCookie(self.exp, self.data) - c._expiry = 'this is bad' + c._expiry = 0 # pylint: disable=W0212 self.assertFalse(self.jar.isGoodCookie(c)) def test_is_invalid_changed_data(self): c = self.jar.makeCookie(self.exp, self.data) - c._data = 'this is bad' + c._data = 'this is bad' # pylint: disable=W0212 self.assertFalse(self.jar.isGoodCookie(c)) def test_is_invalid_changed_mac(self): c = self.jar.makeCookie(self.exp, self.data) - c._mac = 'this is bad' + c._mac = 'this is bad' # pylint: disable=W0212 self.assertFalse(self.jar.isGoodCookie(c)) def test_mix_unmix3(self): |