diff options
author | Guilherme Salgado <salgado@canonical.com> | 2011-01-18 08:16:45 -0200 |
---|---|---|
committer | Guilherme Salgado <salgado@canonical.com> | 2011-01-18 08:16:45 -0200 |
commit | d4b82ecf0081b543d2a1bd39f717337a3224816c (patch) | |
tree | bee501f47519d74df0cf0c7c1e60daa40c89ed3a | |
parent | 926ae623bc99d259fc613f720f130b263dd5d10b (diff) | |
parent | 258f1935dfed1411f505cb3d429017e99ac50570 (diff) |
Fix 3 tests that I accidentally broke recently
-rw-r--r-- | linaro_media_create/tests/test_media_create.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linaro_media_create/tests/test_media_create.py b/linaro_media_create/tests/test_media_create.py index 6224120..2ac7a21 100644 --- a/linaro_media_create/tests/test_media_create.py +++ b/linaro_media_create/tests/test_media_create.py @@ -409,6 +409,9 @@ class TestPartitionSetup(TestCaseWithFixtures): self.useFixture(MockSomethingFixture( partitions, '_get_partition_count', lambda media: 2)) tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-') + self.useFixture(MockSomethingFixture( + partitions, '_get_device_file_for_partition_number', + lambda dev, partition: '%s%d' % (tempfile, partition))) media = Media(tempfile) # Pretend the image file is a block device, or else # get_boot_and_root_partitions_for_media will choke. @@ -422,6 +425,9 @@ class TestPartitionSetup(TestCaseWithFixtures): partitions, '_get_partition_count', lambda media: 3)) tempfile = self._create_qemu_img_with_partitions( ',1,0xDA\n,1,0x0C,*\n,,,-') + self.useFixture(MockSomethingFixture( + partitions, '_get_device_file_for_partition_number', + lambda dev, partition: '%s%d' % (tempfile, partition))) media = Media(tempfile) # Pretend the image file is a block device, or else # get_boot_and_root_partitions_for_media will choke. @@ -526,6 +532,9 @@ class TestPartitionSetup(TestCaseWithFixtures): self.useFixture(MockSomethingFixture( partitions, 'is_partition_mounted', lambda part: True)) tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-') + self.useFixture(MockSomethingFixture( + partitions, '_get_device_file_for_partition_number', + lambda dev, partition: '%s%d' % (tempfile, partition))) media = Media(tempfile) # Pretend our tempfile is a block device. media.is_block_device = True |