def test_fill_img_with_color(self, mock): bgcolor = '#000' self.img.bgcolor = bgcolor self.img._fill_image_with_color() mock.assert_called_once_with( [(0, 0), self.img.image.size], fill=bgcolor)