tests: gadget0: config should be 0 in addressed state

This commit is contained in:
Karl Palsson 2016-01-27 00:08:31 +00:00
parent 8225089cc9
commit 63fda0a231
1 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,12 @@ class TestGadget0(unittest.TestCase):
"""
self.dev.set_configuration(3)
def test_config_zero_addressed(self):
self.dev.set_configuration(0)
x = self.dev.ctrl_transfer(0x80, 0x08, 0, 0, 1)
self.assertEqual(0, x[0], "Should be configuration 0 before configuration is set")
def test_fetch_config(self):
self.dev.set_configuration(3)
# FIXME - find a way to get the defines for these from pyusb