import unittest import base64 from pathlib import Path import requests from testing.utils import * class TestIdCardAddress(unittest.TestCase): def _helper(self, image_path, orient, image_type='0'): root = Path(__file__).parent image_path = str(root / image_path) r = send_request(image_path, image_type) self.assertEqual(orient, r['result']['orientation'], f'{image_path} orientation case error')