예제 #1
0
    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
예제 #2
0
    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