Fix PGPKey.from_blob('') not raising an exception. Fixes #199.

This commit is contained in:
J08nY
2017-07-28 14:55:30 +02:00
parent e183c68fbf
commit b7226e1777
2 changed files with 8 additions and 2 deletions

View File

@@ -332,3 +332,9 @@ def test_oneline_cleartext(sf, cleartext):
assert dearmor['magic'] == 'SIGNATURE'
# No newline at the end
assert dearmor['cleartext'] == cleartext
@pytest.mark.regression(issue=199)
def test_armorable_empty_str():
with pytest.raises(ValueError, message='Expected: ASCII-armored PGP data'):
Armorable.ascii_unarmor('')