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
=== modified file 'linaro_media_create/tests/test_media_create.py'
--- linaro_media_create/tests/test_media_create.py 2011-01-13 00:00:49 +0000
+++ linaro_media_create/tests/test_media_create.py 2011-01-14 20:30:08 +0000
@@ -425,6 +425,9 @@
425 self.useFixture(MockSomethingFixture(425 self.useFixture(MockSomethingFixture(
426 partitions, '_get_partition_count', lambda media: 2))426 partitions, '_get_partition_count', lambda media: 2))
427 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')427 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')
428 self.useFixture(MockSomethingFixture(
429 partitions, '_get_device_file_for_partition_number',
430 lambda dev, partition: '%s%d' % (tempfile, partition)))
428 media = Media(tempfile)431 media = Media(tempfile)
429 # Pretend the image file is a block device, or else432 # Pretend the image file is a block device, or else
430 # get_boot_and_root_partitions_for_media will choke.433 # get_boot_and_root_partitions_for_media will choke.
@@ -438,6 +441,9 @@
438 partitions, '_get_partition_count', lambda media: 3))441 partitions, '_get_partition_count', lambda media: 3))
439 tempfile = self._create_qemu_img_with_partitions(442 tempfile = self._create_qemu_img_with_partitions(
440 ',1,0xDA\n,1,0x0C,*\n,,,-')443 ',1,0xDA\n,1,0x0C,*\n,,,-')
444 self.useFixture(MockSomethingFixture(
445 partitions, '_get_device_file_for_partition_number',
446 lambda dev, partition: '%s%d' % (tempfile, partition)))
441 media = Media(tempfile)447 media = Media(tempfile)
442 # Pretend the image file is a block device, or else448 # Pretend the image file is a block device, or else
443 # get_boot_and_root_partitions_for_media will choke.449 # get_boot_and_root_partitions_for_media will choke.
@@ -542,6 +548,9 @@
542 self.useFixture(MockSomethingFixture(548 self.useFixture(MockSomethingFixture(
543 partitions, 'is_partition_mounted', lambda part: True))549 partitions, 'is_partition_mounted', lambda part: True))
544 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')550 tempfile = self._create_qemu_img_with_partitions(',1,0x0C,*\n,,,-')
551 self.useFixture(MockSomethingFixture(
552 partitions, '_get_device_file_for_partition_number',
553 lambda dev, partition: '%s%d' % (tempfile, partition)))
545 media = Media(tempfile)554 media = Media(tempfile)
546 # Pretend our tempfile is a block device.555 # Pretend our tempfile is a block device.
547 media.is_block_device = True556 media.is_block_device = True

Subscribers

People subscribed via source and target branches