Probably :-)


On 31 March 2014 19:43:14 Alex Gaynor <notifications@github.com> wrote:

> > @@ -251,3 +253,15 @@ def test_activate_builtin_random_already_active(self):
> >          backend.activate_builtin_random()
> >          e = backend._lib.ENGINE_get_default_RAND()
> >          assert e == backend._ffi.NULL
> > +
> > +
> > +class TestOpenSSLSerialisationWithOpenSSL(object):
> > +    def test_password_too_long(self):
> > +        ffi_cb, cb = backend._pem_password_cb(b"aa")
> > +        assert cb(None, 1, False, None) == 0
> > +
> > +    def test_unsupported_evp_pkey_type(self):
> > +        key = collections.namedtuple("evp_pkey", ["type"])("unsupported")
>
> Wouldn't just using a regular `pretend.stub` be easier here?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/pyca/cryptography/pull/627/files#r11130239