'If C{singleUseKeys} is set, every context must have
C{OP_SINGLE_DH_USE} and C{OP_SINGLE_ECDH_USE} set.'

def test_singleUseKeys(self):

    opts = sslverify.OpenSSLCertificateOptions(privateKey=self.sKey, certificate=self.sCert, enableSingleUseKeys=True)
    opts._contextFactory = FakeContext
    ctx = opts.getContext()
    options = (SSL.OP_SINGLE_DH_USE | SSL.OP_SINGLE_ECDH_USE)
    self.assertEqual(options, (ctx._options & options))
