def test_get_relay_boards(self): self.make_pandas() device_list_from_inv = [self.panda1_inv, self.panda2_inv] relay_board_list = inventorysync.get_relay_boards(device_list_from_inv) self.assertEqual( sorted(relay_board_list), sorted([{'fqdn': 'relay-2.fqdn', 'imaging_server': 'mobile-services2', 'name': 'relay-2'}, {'fqdn': 'relay-1', 'imaging_server': 'mobile-services1', 'name': 'relay-1'}]))
def test_get_relay_boards(self): self.make_pandas() device_list_from_inv = [self.panda1_inv, self.panda2_inv] relay_board_list = inventorysync.get_relay_boards(device_list_from_inv) self.assertEqual( sorted(relay_board_list), sorted([{ 'fqdn': 'relay-2.fqdn', 'imaging_server': 'mobile-services2', 'name': 'relay-2' }, { 'fqdn': 'relay-1', 'imaging_server': 'mobile-services1', 'name': 'relay-1' }]))
def test_get_relay_boards_raise_runtime_error(self): self.make_pandas() self.assertRaises(RuntimeError, lambda: inventorysync.get_relay_boards([self.panda1_inv, self.panda3_inv]))
def test_get_relay_boards_raise_runtime_error(self): self.make_pandas() self.assertRaises( RuntimeError, lambda: inventorysync.get_relay_boards( [self.panda1_inv, self.panda3_inv]))