id_test.py 553 B

1234567891011121314151617181920
  1. import unittest
  2. from pathlib import Path
  3. from testing.utils import *
  4. class TestIdCardAddress(unittest.TestCase):
  5. def _helper(self, image_path, id):
  6. root = Path(__file__).parent
  7. image_path = str(root / image_path)
  8. r = send_request(image_path, '0')
  9. self.assertEqual(id, r['result']['id']['text'], f'{image_path} id case error')
  10. # def test_01(self):
  11. # image_path = '../images/false/miss_id/01.jpg'
  12. # self._helper(image_path, '52213019970701363X')
  13. if __name__ == '__main__':
  14. unittest.main()