':py:obj:`Connection.set_context` specifies a new :py:obj:`Context` instance to be used
for the connection.'

def test_set_context(self):

    original = Context(SSLv23_METHOD)
    replacement = Context(TLSv1_METHOD)
    connection = Connection(original, None)
    connection.set_context(replacement)
    self.assertIdentical(replacement, connection.get_context())
    del original, replacement
    collect()
