Ejemplo n.º 1
0
    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))
Ejemplo n.º 2
0
    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))
Ejemplo n.º 3
0
    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))
Ejemplo n.º 4
0
    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))