def get_image_region_cases(self): cases = image_test.get_image_region_cases() m = dict(expand="expand", format="fmt", quality="q") for i, case in enumerate(cases): path = "/test/data/%s" % os.path.basename(case["source_path"]) cases[i]["source_query_params"] = dict(op="region", url=self.get_url(path), rect=case["rect"]) for k in m.keys(): if k in case: cases[i]["source_query_params"][m.get(k)] = case[k] cases[i]["content_type"] = self._format_to_content_type( case.get("format")) return cases
def get_image_region_cases(self): cases = image_test.get_image_region_cases() m = dict(expand="expand", format="fmt", quality="q") for i, case in enumerate(cases): path = "/test/data/%s" % os.path.basename(case["source_path"]) cases[i]["source_query_params"] = dict( op="region", url=self.get_url(path), rect=case["rect"]) for k in m.keys(): if k in case: cases[i]["source_query_params"][m.get(k)] = case[k] cases[i]["content_type"] = self._format_to_content_type( case.get("format")) return cases