orient_1_test.py 436 B

1234567891011121314
  1. import unittest
  2. import base64
  3. from pathlib import Path
  4. import requests
  5. from testing.utils import *
  6. class TestIdCardAddress(unittest.TestCase):
  7. def _helper(self, image_path, orient, image_type='0'):
  8. root = Path(__file__).parent
  9. image_path = str(root / image_path)
  10. r = send_request(image_path, image_type)
  11. self.assertEqual(orient, r['result']['orientation'], f'{image_path} orientation case error')