def run(): loader = Loader() loader.load() # AMQP-0-9-1 adapter = loader.catalog['amqp-0-9-1'] test = Test(URL, adapter) test() # amqp adapter = loader.catalog['amqp'] test = Test(URL, adapter) test()
def run(): loader = Loader() loader.load() # amqp-1-0 adapter = loader.catalog['amqp-1-0'] test = Test(URL, adapter) test.test_crud() test.test_no_exchange() # proton adapter = loader.catalog['proton'] test = Test(URL, adapter) test.test_crud() test.test_no_exchange()
def run(): # AMQP-0-10 loader = Loader() loader.load() adapter = loader.catalog['amqp-0-10'] test = Test(URL, adapter) test() # qpid adapter = loader.catalog['qpid'] test = Test(URL, adapter) test() # qpid-messaging adapter = loader.catalog['qpid.messaging'] test = Test(URL, adapter) test()
def test_already_loaded(self, _load): ldr = Loader() ldr.list = [1, 2] ldr.catalog = {'A': 1, 'B': 2} _list, catalog = ldr.load() self.assertFalse(_load.called) self.assertEqual(_list, ldr.list) self.assertEqual(catalog, ldr.catalog)
def test_load(self, _load): _load.return_value = ([], {}) ldr = Loader() _list, catalog = ldr.load() _load.assert_called_with() self.assertEqual(_list, _load.return_value[0]) self.assertEqual(catalog, _load.return_value[1]) self.assertEqual(ldr.list, _load.return_value[0]) self.assertEqual(ldr.catalog, _load.return_value[1])