def test_decode_garbage(self): """ If decoding fails, `~txacme.util.decode_csr` raises `~josepy.errors.DeserializationError`. """ with ExpectedException(DeserializationError): decode_csr(u'blah blah not a valid CSR')
def test_decode_garbage(self): """ If decoding fails, `~txacme.util.decode_csr` raises `~acme.jose.errors.DeserializationError`. """ with ExpectedException(DeserializationError): decode_csr(u'blah blah not a valid CSR')
def test_roundtrip(self, names): """ The encoding roundtrips. """ assume(len(names[0]) <= 64) csr = csr_for_names(names, RSA_KEY_512_RAW) self.assertThat(decode_csr(encode_csr(csr)), Equals(csr))