Esempio n. 1
0
    def test_sapdiag_items(self):
        """Test dissection of Diag Items"""
        diag_items = SAPDiagItems(read_data_file('nw_703_login_screen_decompressed.data'))

        self.assertEqual(len(diag_items.message), 131)

        for item in diag_items.message:
            self.assertIsInstance(item, SAPDiagItem)
Esempio n. 2
0
    def test_sapdiag_atoms(self):
        """Test dissection of Diag Items and Dynt Atom Items"""
        diag_items = SAPDiagItems(read_data_file('nw_703_login_screen_decompressed.data'))
        diag_packet = SAPDiag(message=diag_items.message)
        diag_atoms = diag_packet.get_item(0x12, 0x09, 0x02)

        for atom in diag_atoms:
            for atom_item in atom.item_value.items:
                self.assertIsInstance(atom_item, SAPDiagDyntAtomItem)