other_test.py 878 B

1234567891011121314151617181920212223242526272829303132
  1. import base64
  2. import unittest
  3. from pathlib import Path
  4. from testing.utils import *
  5. class TestIdCardAddress(unittest.TestCase):
  6. def _helper(self, image_path):
  7. root = Path(__file__).parent
  8. image_path = str(root / image_path)
  9. r = send_request(image_path, 0)
  10. self.assertEqual(r['status'], '000', f'{image_path}status case error')
  11. # 难
  12. def test_06(self):
  13. image_path = '../images/false/others/06.jpg'
  14. self._helper(image_path)
  15. # 难
  16. def test_07(self):
  17. image_path = '../images/false/others/07.jpg'
  18. self._helper(image_path)
  19. # 北京市宣武区cpca错误
  20. def test_cpca(self):
  21. image_path = '../images/false/others/cpca.png'
  22. self._helper(image_path)
  23. def test_long_name(self):
  24. image_path = '../images/false/others/long_name.png'
  25. self._helper(image_path)