Skip to content

Commit

Permalink
Merge 7c8c5c6 into d363ae9
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-adams committed May 6, 2016
2 parents d363ae9 + 7c8c5c6 commit c4054d6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/test_algorithms.py
Expand Up @@ -56,31 +56,27 @@ def test_hmac_should_accept_unicode_key(self):

algo.prepare_key(ensure_unicode('awesome'))

@pytest.mark.skipif(not has_crypto, reason='Not supported without cryptography library')
def test_hmac_should_throw_exception_if_key_is_pem_public_key(self):
algo = HMACAlgorithm(HMACAlgorithm.SHA256)

with pytest.raises(InvalidKeyError):
with open(key_path('testkey2_rsa.pub.pem'), 'r') as keyfile:
algo.prepare_key(keyfile.read())

@pytest.mark.skipif(not has_crypto, reason='Not supported without cryptography library')
def test_hmac_should_throw_exception_if_key_is_x509_certificate(self):
algo = HMACAlgorithm(HMACAlgorithm.SHA256)

with pytest.raises(InvalidKeyError):
with open(key_path('testkey_rsa.cer'), 'r') as keyfile:
algo.prepare_key(keyfile.read())

@pytest.mark.skipif(not has_crypto, reason='Not supported without cryptography library')
def test_hmac_should_throw_exception_if_key_is_ssh_public_key(self):
algo = HMACAlgorithm(HMACAlgorithm.SHA256)

with pytest.raises(InvalidKeyError):
with open(key_path('testkey_rsa.pub'), 'r') as keyfile:
algo.prepare_key(keyfile.read())

@pytest.mark.skipif(not has_crypto, reason='Not supported without cryptography library')
def test_hmac_should_throw_exception_if_key_is_x509_cert(self):
algo = HMACAlgorithm(HMACAlgorithm.SHA256)

Expand Down

0 comments on commit c4054d6

Please sign in to comment.