sbt-idp/tests/test_set_03_big_image_sizes.py
2023-12-26 15:58:44 +07:00

23 lines
782 B
Python

import sys
sys.path.append(".")
from tests.utils import login, make_sbt_request, get_field
import os
import logging
HOST = os.environ.get("IDP_HOST", "XXXXXXXXXXXXXXXXXXXXX")
USERNAME = os.environ.get("IDP_USERNAME", "XXXXXXXXXXXXXXXXXXXXX")
PASSWORD = os.environ.get("IDP_PASSWORD", "XXXXXXXXXXXXXXXXXXXXX")
token = login(HOST, USERNAME, PASSWORD)
def test_invoice_larger_than_5000x5000():
invoice_files = [
"test_samples/test_03/image_larger_than_5K.jpg"
]
imei_files = [
"test_samples/sbt/imei1.jpg"
]
data = make_sbt_request(host=HOST, token=token, invoice_files=invoice_files, imei_files=imei_files, ensure_success=False)
response_data = data["data"]
assert "is not valid, maximum size for one side is 5000" in str(response_data)