def test_remove_signature_and_is_signed_corner_cases(self): assert not unsign.is_signed(None) assert unsign.remove_signature(None) == None assert not unsign.is_signed('') assert unsign.remove_signature('') == '' assert not unsign.is_signed('\n') assert unsign.remove_signature('\n') == '\n' assert not unsign.is_signed('sometext\n') assert unsign.remove_signature('sometext\n') == 'sometext\n'
def test_is_signed4(self): text = '''-----END PGP SIGNATURE-----''' assert not unsign.is_signed(text)
def test_is_signed3(self): text = '''-----BEGIN PGP SIGNED MESSAGE-----''' assert not unsign.is_signed(text)
def test_is_signed2(self): text = '''-----BEGIN PGP SIGNED MESSAGE----- -----END PGP SIGNATURE-----''' assert unsign.is_signed(text)
def test_remove_signature_and_is_signed_compact(self): assert unsign.is_signed(COMPACT) assert unsign.remove_signature(COMPACT) == EXPECTED_COMPACT
def test_remove_signature_and_is_signed_signed(self): assert unsign.is_signed(SIGNED) assert unsign.remove_signature(SIGNED) == EXPECTED_SIGNED
def test_remove_signature_and_is_signed_empty_signed(self): assert unsign.is_signed(EMPTY) assert unsign.remove_signature(EMPTY) == '\n'
def test_remove_signature_and_is_signed_not_signed(self): assert not unsign.is_signed(PLAIN) assert unsign.remove_signature(PLAIN) == PLAIN