diff options
author | Mohammed Attia <skeuomorf@gmail.com> | 2014-03-03 21:08:47 +0200 |
---|---|---|
committer | Mohammed Attia <skeuomorf@gmail.com> | 2014-03-03 21:08:47 +0200 |
commit | fb0b5c8924f0546df3862be9f6d39f5cc195b9d9 (patch) | |
tree | 4e973989e16ed0473d0191f7998e74bf84bdea29 /tests | |
parent | 61b47b989dc87cdc760c9d297fd45f219b64efd1 (diff) | |
parent | c898e8d1328e6c0c65c13923a9581f7b41911ae3 (diff) | |
download | cryptography-fb0b5c8924f0546df3862be9f6d39f5cc195b9d9.tar.gz cryptography-fb0b5c8924f0546df3862be9f6d39f5cc195b9d9.tar.bz2 cryptography-fb0b5c8924f0546df3862be9f6d39f5cc195b9d9.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hazmat/primitives/twofactor/test_hotp.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/twofactor/test_hotp.py b/tests/hazmat/primitives/twofactor/test_hotp.py index 4c726b77..0f8c4a53 100644 --- a/tests/hazmat/primitives/twofactor/test_hotp.py +++ b/tests/hazmat/primitives/twofactor/test_hotp.py @@ -87,3 +87,9 @@ class TestHOTP(object): with pytest.raises(InvalidToken): hotp.verify(b"123456", counter) + + def test_length_not_int(self, backend): + secret = b"12345678901234567890" + + with pytest.raises(TypeError): + HOTP(secret, b"foo", SHA1(), backend) |