Example #1
0
    def test_set_server_status(self):
        fab = _MockupFabric(_HOST, _PORT)

        fabinst = connection.FabricConnection(fab, _HOST, _PORT)
        fabinst._proxy = _MockupXMLProxy()
        fab._fabric_instances[fabinst.uuid] = fabinst

        fab.set_server_status(uuid.uuid4(), connection._SERVER_STATUS_FAULTY)
    def test_report_failure(self):
        fab = _MockupFabric(_HOST, _PORT)

        fabinst = connection.FabricConnection(fab, _HOST, _PORT)
        fabinst._proxy = _MockupXMLProxy()
        fab._fabric_instances[fabinst.uuid] = fabinst

        fab.report_failure(uuid.uuid4(), connection.REPORT_ERRORS[0])
Example #3
0
 def test_port(self):
     fabcnx = connection.FabricConnection(self.fab, _HOST, port=_PORT)
     self.assertEqual(_PORT, self.fabcnx.port)
Example #4
0
 def setUp(self):
     self.fab = connection.Fabric(_HOST, port=_PORT)
     self.fabcnx = connection.FabricConnection(self.fab, _HOST, port=_PORT)