'Two :py:obj:`Connection`s which use memory BIOs can be manually connected by
reading from the output of each and writing those bytes to the input of
the other and in this way establish a connection and exchange
application-level bytes with each other.'

def test_memoryConnect(self):

    server_conn = self._server(None)
    client_conn = self._client(None)
    self.assertIdentical(server_conn.master_key(), None)
    self.assertIdentical(server_conn.client_random(), None)
    self.assertIdentical(server_conn.server_random(), None)
    self.assertIdentical(self._interactInMemory(client_conn, server_conn), None)
    self.assertNotIdentical(server_conn.master_key(), None)
    self.assertNotIdentical(server_conn.client_random(), None)
    self.assertNotIdentical(server_conn.server_random(), None)
    self.assertEquals(server_conn.client_random(), client_conn.client_random())
    self.assertEquals(server_conn.server_random(), client_conn.server_random())
    self.assertNotEquals(server_conn.client_random(), server_conn.server_random())
    self.assertNotEquals(client_conn.client_random(), client_conn.server_random())
    important_message = b('One    if    by    land,    two    if    by    sea.')
    server_conn.write(important_message)
    self.assertEquals(self._interactInMemory(client_conn, server_conn), (client_conn, important_message))
    client_conn.write(important_message[::(-1)])
    self.assertEquals(self._interactInMemory(client_conn, server_conn), (server_conn, important_message[::(-1)]))
