示例#1
0
 def test_merge_images_chained_calls_merge_images(self, ms_merge_images):
     ms.merge_images_chained('a', 'b', 'c', 'd', 'e', 'f')
     ms_merge_images.assert_called_once_with(img1_primary_id_in='b',
                                             img1_alternate_id_in='c',
                                             img2_id_in='d',
                                             img_id_out='e',
                                             group_id='f')
示例#2
0
 def test_merge_images_chained_calls_merge_images(self,
                                                  ms_merge_images):
     ms.merge_images_chained('a', 'b', 'c', 'd', 'e', 'f')
     ms_merge_images.assert_called_once_with(img1_primary_id_in='b',
                                             img1_alternate_id_in='c',
                                             img2_id_in='d',
                                             img_id_out='e',
                                             group_id='f')
示例#3
0
    def test_merge_images_chained_catches_exception(
            self, ms_merge_images, ms_log_asynchronous_exception):
        the_exception = ThermalBaseError('wendy_williams')
        ms_merge_images.side_effect = the_exception

        ms.merge_images_chained('a', 'b', 'c', 'd', 'e', 'f')

        ms_merge_images.assert_called_once_with(img1_primary_id_in='b',
                                                img1_alternate_id_in='c',
                                                img2_id_in='d',
                                                img_id_out='e',
                                                group_id='f')
        ms_log_asynchronous_exception.assert_called_once_with(the_exception)
示例#4
0
    def test_merge_images_chained_catches_exception(self,
                                                    ms_merge_images,
                                                    ms_log_asynchronous_exception):
        the_exception = ThermalBaseError('wendy_williams')
        ms_merge_images.side_effect = the_exception

        ms.merge_images_chained('a', 'b', 'c', 'd', 'e', 'f')

        ms_merge_images.assert_called_once_with(img1_primary_id_in='b',
                                                img1_alternate_id_in='c',
                                                img2_id_in='d',
                                                img_id_out='e',
                                                group_id='f')
        ms_log_asynchronous_exception.assert_called_once_with(the_exception)