diff options
author | Guilherme Salgado <salgado@canonical.com> | 2011-01-14 14:26:25 -0600 |
---|---|---|
committer | Guilherme Salgado <salgado@canonical.com> | 2011-01-14 14:26:25 -0600 |
commit | 258f1935dfed1411f505cb3d429017e99ac50570 (patch) | |
tree | c5fb0cbfb5c9489e525d5b2e7bd000616cce0efd /linaro_media_create | |
parent | c06b0251405c1c41677e0f2b80c6224bc9159827 (diff) |
Fix 3 tests that my last commit broke
Diffstat (limited to 'linaro_media_create')
-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 1266ad4..619276a 100644 --- a/linaro_media_create/tests/test_media_create.py +++ b/linaro_media_create/tests/test_media_create.py @@ -425,6 +425,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. @@ -438,6 +441,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. @@ -542,6 +548,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 |