def test_entity_without_serial_number_is_not_module(self): sensor = { 'entPhysicalDescr': 'Chassis', 'entPhysicalContainedIn': 1, 'entPhysicalClass': 'module', 'entPhysicalSerialNum': '', 'entPhysicalIsFRU': True, } self.assertFalse(EntityTable.is_module(self.entity_table, sensor))
def test_transceiver_is_not_module(self): transceiver = { 'entPhysicalDescr': 'Transceiver', 'entPhysicalContainedIn': 2, 'entPhysicalClass': 'module', 'entPhysicalSerialNum': '1', 'entPhysicalIsFRU': True, } self.assertFalse(EntityTable.is_module(self.entity_table, transceiver))
def test_not_FRU_is_not_module(self): sensor = { 'entPhysicalDescr': 'Chassis', 'entPhysicalContainedIn': 1, 'entPhysicalClass': 'module', 'entPhysicalSerialNum': '1', 'entPhysicalIsFRU': False, } self.assertFalse(EntityTable.is_module(self.entity_table, sensor))
def test_module_is_module(self): module = { 'entPhysicalDescr': 'Chassis', 'entPhysicalContainedIn': 1, 'entPhysicalClass': 'module', 'entPhysicalSerialNum': '1', 'entPhysicalIsFRU': True, } self.assertTrue(EntityTable.is_module(self.entity_table, module))