Ejemplo n.º 1
0
    def get_image_rotate_cases(self):
        cases = image_test.get_image_rotate_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="rotate",
                                                   url=self.get_url(path),
                                                   deg=case["degree"])
            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
Ejemplo n.º 2
0
    def get_image_rotate_cases(self):
        cases = image_test.get_image_rotate_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="rotate",
                url=self.get_url(path),
                deg=case["degree"])
            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