def test_generate_filename(self):
     tests = (
         ((85, False), ('testing.jpg', 50, 50), 'testing_jpg_50x50_q85.jpg'),
         ((85, False), ('testing.png', 50, 50), 'testing_png_50x50_q85.png'),
         ((75, True), ('testing.jpg', 75, 75), 'testing_jpg_75x75_q75_up.jpg')
     )
     for test in tests:
         proc = ResizeProcessor(quality=test[0][0], upscale=test[0][1])
         self.assertEqual(proc.generate_filename(*test[1]), test[2])
 def test_generate_thumbnail(self):
     image = Image.new('RGB', PIC_SIZE)
     tests = (
         (False, (400, 300), (400, 300)),
         (False, (400, 400), (400, 300)),
         (True, (1600, 1200), (1600, 1200)),
     )
     for test in tests:
         proc = ResizeProcessor(upscale=test[0])
         thumb = proc.generate_thumbnail(image, *test[1])
         self.assertEqual(thumb.size, test[2])