def test_fetch_from_image(self, create_screenshot_from_production_link): skyrider = Production.objects.get(title="Skyrider") link = skyrider.links.create( link_class='BaseUrl', parameter='http://example.com/skyrider.png', is_download_link=True ) fetch_remote_screenshots() create_screenshot_from_production_link.delay.assert_called_once_with(link.id)
def test_fetch_from_zip(self, create_screenshot_from_production_link): skyrider = Production.objects.get(title="Skyrider") skyrider.types.set([ProductionType.objects.get(name='Graphics')]) link = skyrider.links.create( link_class='BaseUrl', parameter='http://example.com/skyrider.zip', is_download_link=True, file_for_screenshot='skyrider.png' ) fetch_remote_screenshots() create_screenshot_from_production_link.delay.assert_called_once_with(link.id)