def test_pack__enclosure_no_extended_data(self): data = StandardInquiryDataBuffer( peripheral_device=PeripheralDeviceDataBuffer(qualifier=0, type=13), acc=0, additional_length=31, addr16=0, cmd_que=0, enc_serv=1, hisup=0, multi_p=0, normaca=0, product_identification=u'x28-05.75.B002', product_revision_level=u'000', protect=0, response_data_format=2, rmb=0, sccs=0, sync=0, t10_vendor_identification=u'SAS E', threepc=0, tpgs=0, version=3, wbus16=0) packed_data = data.pack() raw_data = hex_to_bin( "0d 00 03 02 1f 00 40 00 53 41 53 20 45 20 20 20" + "78 32 38 2d 30 35 2e 37 35 2e 42 30 30 32 20 20" + "30 30 30 20") self.assertEqual(raw_data, packed_data)
def test_pack__enclosure_no_extended_data(self): data = StandardInquiryDataBuffer(peripheral_device=PeripheralDeviceDataBuffer(qualifier=0, type=13), acc=0, additional_length=31, addr16=0, cmd_que=0, enc_serv=1, hisup=0, multi_p=0, normaca=0, product_identification=u'x28-05.75.B002', product_revision_level=u'000', protect=0, response_data_format=2, rmb=0, sccs=0, sync=0, t10_vendor_identification=u'SAS E', threepc=0, tpgs=0, version=3, wbus16=0) packed_data = data.pack() raw_data = hex_to_bin( "0d 00 03 02 1f 00 40 00 53 41 53 20 45 20 20 20" + "78 32 38 2d 30 35 2e 37 35 2e 42 30 30 32 20 20" + "30 30 30 20") self.assertEqual(raw_data, packed_data)