Merge lp:~pwlars/lava-test/get_board_devs-fix into lp:lava-test/0.0

Proposed by Paul Larson
Status: Merged
Merged at revision: 43
Proposed branch: lp:~pwlars/lava-test/get_board_devs-fix
Merge into: lp:lava-test/0.0
Diff against target: 28 lines (+6/-2)
1 file modified
tests/test_hwprofile.py (+6/-2)
To merge this branch: bzr merge lp:~pwlars/lava-test/get_board_devs-fix
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+37913@code.launchpad.net

Description of the change

Quick fix for a braindead "works on my machine" unit test :)

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Ooops, should have spotted this, sorry.

Thanks,

James

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

On Thu, 2010-10-07 at 21:45 +0000, James Westby wrote:
> Review: Approve
> Ooops, should have spotted this, sorry.
As should I, playing with hudson today made me spot it because it was
running on a different box. :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_hwprofile.py'
2--- tests/test_hwprofile.py 2010-09-27 14:20:17 +0000
3+++ tests/test_hwprofile.py 2010-10-07 21:41:03 +0000
4@@ -40,6 +40,8 @@
5 Serial : 0000000000000000"""
6
7 FAKE_BOARDNAME_FILE = "XXXXXXX"
8+FAKE_BOARDVENDOR_FILE = "YYYYYYY"
9+FAKE_BOARDVERSION_FILE = "ZZZZZZZ"
10
11 FAKE_MEMINFO_FILE = """MemTotal: 238220 kB
12 MemFree: 45992 kB
13@@ -98,11 +100,13 @@
14
15 def test_get_board_devs(self):
16 fake_file('/sys/class/dmi/id/board_name', FAKE_BOARDNAME_FILE)
17+ fake_file('/sys/class/dmi/id/board_vendor', FAKE_BOARDVENDOR_FILE)
18+ fake_file('/sys/class/dmi/id/board_version', FAKE_BOARDVERSION_FILE)
19 devs = abrek.hwprofile.get_board_devs()
20 boardinfo = {
21 'attributes': {
22- 'version': 'Not Available',
23- 'vendor': 'LENOVO'},
24+ 'version': 'ZZZZZZZ',
25+ 'vendor': 'YYYYYYY'},
26 'description': 'XXXXXXX',
27 'device_type': 'device.board'}
28 self.assertEqual(boardinfo, devs[0])

Subscribers

People subscribed via source and target branches