1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import unittest
- import base64
- from pathlib import Path
- import requests
- from testing.utils import *
- class TestBank101(unittest.TestCase):
- def _helper(self, image_path, sta):
- root = Path(__file__).parent
- image_path = str(root / image_path)
- r = send_request(image_path)
- self.assertEqual(sta, r['status'], f'{image_path} status case error')
- def test_error_03(self):
- image_path = '../images/error/101_error/03.png'
- self._helper(image_path, '000')
- def test_error_04(self):
- image_path = '../images/error/101_error/04.png'
- self._helper(image_path, '000')
- def test_error_05(self):
- image_path = '../images/error/101_error/05.png'
- r = send_request(image_path)
- self.assertEqual(r['status'], '000', 'status case error')
- def test_error_06(self):
- image_path = '../images/error/101_error/06.png'
- self._helper(image_path, '000')
- def test_error_08(self):
- image_path = '../images/error/101_error/08.png'
- self._helper(image_path, '000')
- def test_error_10(self):
- image_path = '../images/error/101_error/10.png'
- self._helper(image_path, '000')
- def test_error_11(self):
- image_path = '../images/error/101_error/11.png'
- self._helper(image_path, '000')
|