From de53bd2c0f2584ebfa6437b659455d0701af72d6 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 2 Jul 2024 17:03:08 -0400 Subject: [PATCH] Use pid.codes VID/PID in unit tests --- LICENSE.txt | 2 +- usb_protocol/types/descriptors/standard.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 00d281c..3882fee 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020, Great Scott Gadgets +Copyright (c) 2020-2024, Great Scott Gadgets Copyright (c) 2020, Katherine J. Temkin Redistribution and use in source and binary forms, with or without diff --git a/usb_protocol/types/descriptors/standard.py b/usb_protocol/types/descriptors/standard.py index 8f65906..17031fb 100644 --- a/usb_protocol/types/descriptors/standard.py +++ b/usb_protocol/types/descriptors/standard.py @@ -277,8 +277,8 @@ def test_device_descriptor(self): 0xFF, # subclass 0xFF, # protocol 64, # ep0 max packet size - 0xd0, 0x16, # VID - 0x3b, 0x0f, # PID + 0x09, 0x12, # VID + 0x01, 0x00, # PID 0x00, 0x00, # device rev 0x01, # manufacturer string 0x02, # product string @@ -297,8 +297,8 @@ def test_device_descriptor(self): self.assertEqual(parsed.bDeviceSubclass, 0xFF) self.assertEqual(parsed.bDeviceProtocol, 0xFF) self.assertEqual(parsed.bMaxPacketSize0, 64) - self.assertEqual(parsed.idVendor, 0x16d0) - self.assertEqual(parsed.idProduct, 0x0f3b) + self.assertEqual(parsed.idVendor, 0x1209) + self.assertEqual(parsed.idProduct, 0x0001) self.assertEqual(parsed.bcdDevice, 0) self.assertEqual(parsed.iManufacturer, 1) self.assertEqual(parsed.iProduct, 2)