From 258f1935dfed1411f505cb3d429017e99ac50570 Mon Sep 17 00:00:00 2001 From: Guilherme Salgado Date: Fri, 14 Jan 2011 14:26:25 -0600 Subject: Fix 3 tests that my last commit broke --- linaro_media_create/tests/test_media_create.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'linaro_media_create/tests/test_media_create.py') 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 -- cgit v1.2.3