Merge lp:~sylvain-pineau/checkbox/fix_udev into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 1959
Merged at revision: 1959
Proposed branch: lp:~sylvain-pineau/checkbox/fix_udev
Merge into: lp:checkbox
Diff against target: 19 lines (+2/-2)
1 file modified
checkbox/parsers/tests/test_submission.py (+2/-2)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix_udev
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+151452@code.launchpad.net

Commit message

Fix test_submission.py now that the udevadm parser detects devices using ID_MODEL_FROM_DATABASE and ID_VENDOR_FROM_DATABASE.

Description of the change

Since rev. 1958, the udevadm parser returns new devices thanks to ID_MODEL_FROM_DATABASE and ID_VENDOR_FROM_DATABASE.

The tests were failing because 5 new devices are found now by the parsers:

                   {'bus_name': 'tty',
                    'category_name': 'OTHER',
                    'driver_name': 'serial',
                    'path': '/devices/pci0000:00/0000:00:16.3/tty/ttyS4',
                    'product_id': None,
                    'product_name': '5 Series/3400 Series Chipset KT Controller',
                    'subproduct_id': None,
                    'subvendor_id': None,
                    'vendor_id': None,
                    'vendor_name': 'Intel Corporation'},

                   {'bus_name': 'net',
                    'category_name': 'NETWORK',
                    'driver_name': 'e1000e',
                    'path': '/devices/pci0000:00/0000:00:19.0/net/eth0',
                    'product_id': None,
                    'product_name': '82577LM Gigabit Network Connection',
                    'subproduct_id': None,
                    'subvendor_id': None,
                    'vendor_id': None,
                    'vendor_name': 'Intel Corporation'},

                   {'bus_name': 'sound',
                    'category_name': 'AUDIO',
                    'driver_name': 'snd_hda_intel',
                    'path': '/devices/pci0000:00/0000:00:1b.0/sound/card0',
                    'product_id': None,
                    'product_name': '5 Series/3400 Series Chipset High Definition Audio',
                    'subproduct_id': None,
                    'subvendor_id': None,
                    'vendor_id': None,
                    'vendor_name': 'Intel Corporation'},

                   {'bus_name': 'net',
                    'category_name': 'WIRELESS',
                    'driver_name': 'brcmsmac',
                    'path': '/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/bcma0:0/net/wlan0',
                    'product_id': None,
                    'product_name': 'BCM4313 802.11b/g/n Wireless LAN Controller',
                    'subproduct_id': None,
                    'subvendor_id': None,
                    'vendor_id': None,
                    'vendor_name': 'Broadcom Corporation'},
                   {'bus_name': 'sound',
                    'category_name': 'AUDIO',
                    'driver_name': 'snd-usb-audio',
                    'path': '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.1/sound/card1',
                    'product_id': None,
                    'product_name': 'Webcam Classic',
                    'subproduct_id': None,
                    'subvendor_id': None,
                    'vendor_id': None,
                    'vendor_name': 'OmniVision Technologies, Inc.'},

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox/parsers/tests/test_submission.py'
2--- checkbox/parsers/tests/test_submission.py 2012-10-12 21:39:01 +0000
3+++ checkbox/parsers/tests/test_submission.py 2013-03-04 10:34:21 +0000
4@@ -153,13 +153,13 @@
5 """Device states can be in the udev element."""
6 result = self.getResult("submission_udev.xml")
7 self.assertTrue("device_states" in result)
8- self.assertEquals(len(result["device_states"]), 77)
9+ self.assertEquals(len(result["device_states"]), 82)
10
11 def test_device_udevadm(self):
12 """Device states can be in a udevadm info element."""
13 result = self.getResult("submission_info_udevadm.xml")
14 self.assertTrue("device_states" in result)
15- self.assertEquals(len(result["device_states"]), 77)
16+ self.assertEquals(len(result["device_states"]), 82)
17
18 def test_device_dmidecode(self):
19 """Device states can be in a dmidecode info element."""

Subscribers

People subscribed via source and target branches