Merge lp:~salgado/linaro-image-tools/fix-tests into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 241
Proposed branch: lp:~salgado/linaro-image-tools/fix-tests
Merge into: lp:linaro-image-tools/11.11
Diff against target: 33 lines (+9/-0)
1 file modified
linaro_media_create/tests/test_media_create.py (+9/-0)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/fix-tests
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+46325@code.launchpad.net

Description of the change

Fix 3 tests that I broke with my last commit.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_media_create/tests/test_media_create.py'
2--- linaro_media_create/tests/test_media_create.py 2011-01-13 00:00:49 +0000
3+++ linaro_media_create/tests/test_media_create.py 2011-01-14 20:30:08 +0000
4@@ -425,6 +425,9 @@
5 self.useFixture(MockSomethingFixture(
6 partitions, '_get_partition_count', lambda media: 2))
7 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')
8+ self.useFixture(MockSomethingFixture(
9+ partitions, '_get_device_file_for_partition_number',
10+ lambda dev, partition: '%s%d' % (tempfile, partition)))
11 media = Media(tempfile)
12 # Pretend the image file is a block device, or else
13 # get_boot_and_root_partitions_for_media will choke.
14@@ -438,6 +441,9 @@
15 partitions, '_get_partition_count', lambda media: 3))
16 tempfile = self._create_qemu_img_with_partitions(
17 ',1,0xDA\n,1,0x0C,*\n,,,-')
18+ self.useFixture(MockSomethingFixture(
19+ partitions, '_get_device_file_for_partition_number',
20+ lambda dev, partition: '%s%d' % (tempfile, partition)))
21 media = Media(tempfile)
22 # Pretend the image file is a block device, or else
23 # get_boot_and_root_partitions_for_media will choke.
24@@ -542,6 +548,9 @@
25 self.useFixture(MockSomethingFixture(
26 partitions, 'is_partition_mounted', lambda part: True))
27 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')
28+ self.useFixture(MockSomethingFixture(
29+ partitions, '_get_device_file_for_partition_number',
30+ lambda dev, partition: '%s%d' % (tempfile, partition)))
31 media = Media(tempfile)
32 # Pretend our tempfile is a block device.
33 media.is_block_device = True

Subscribers

People subscribed via source and target branches