'Close client and server connections.'

def tearDown(self):

    self.server.factory.protocolInstance.transport.loseConnection()
    self.ref.broker.transport.loseConnection()
    return self.server.stopListening()
