Exemple #1
0
 def next_partname_fixture(self, request):
     existing_partname_numbers, expected_partname_number = request.param
     image_parts = ImageParts()
     for n in existing_partname_numbers:
         image_part_ = self._image_part_with_partname_(request, n)
         image_parts.append(image_part_)
     ext = '.png'
     expected_image_partname = self._image_partname(
         expected_partname_number)
     return image_parts, ext, expected_image_partname
Exemple #2
0
 def next_partname_fixture(self, request):
     existing_partname_numbers, expected_partname_number = request.param
     image_parts = ImageParts()
     for n in existing_partname_numbers:
         image_part_ = self._image_part_with_partname_(request, n)
         image_parts.append(image_part_)
     ext = 'png'
     expected_image_partname = self._image_partname(
         expected_partname_number
     )
     return image_parts, ext, expected_image_partname
    def next_partname_fixture(self, request):
        def image_part_with_partname_(n):
            partname = image_partname(n)
            return instance_mock(request, ImagePart, partname=partname)

        def image_partname(n):
            return PackURI('/word/media/image%d.png' % n)

        existing_partname_numbers, expected_partname_number = request.param
        image_parts = ImageParts()
        for n in existing_partname_numbers:
            image_part_ = image_part_with_partname_(n)
            image_parts.append(image_part_)
        ext = 'png'
        expected_image_partname = image_partname(expected_partname_number)
        return image_parts, ext, expected_image_partname
Exemple #4
0
 def get_image_part_fixture(self, Image_, image_part_, image_descriptor_):
     image_parts = ImageParts()
     image_parts.append(image_part_)
     return image_parts, image_descriptor_, image_part_
Exemple #5
0
 def get_image_part_fixture(self, Image_, image_part_, image_descriptor_):
     image_parts = ImageParts()
     image_parts.append(image_part_)
     return image_parts, image_descriptor_, image_part_