import sys sys.path.append(".") from tests.utils import login, make_sbt_request, get_field import os import logging import json import deepdiff 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_1_invoice_6_imei(): invoice_files = [ "test_samples/test_07/invoice_jpg.jpg", ] imei_files = [ "test_samples/test_07/imei_valid_1.jpg", "test_samples/test_07/imei_valid_2.jpg", "test_samples/test_07/imei_valid_3.jpg", "test_samples/test_07/imei_valid_4.jpg", "test_samples/test_07/imei_valid_5.jpg", "test_samples/test_07/imei_valid_6.jpg", ] data = make_sbt_request(host=HOST, token=token, invoice_files=invoice_files, imei_files=imei_files, ensure_success=False) assert "Limit reached. Number of imei_file limit at 2" in str(data["data"]) def test_1_invoice_5_imei(): invoice_files = [ "test_samples/test_07/invoice_jpg.jpg", ] imei_files = [ "test_samples/test_07/imei_valid_1.jpg", "test_samples/test_07/imei_valid_2.jpg", "test_samples/test_07/imei_valid_3.jpg", "test_samples/test_07/imei_valid_4.jpg", "test_samples/test_07/imei_valid_5.jpg", ] data = make_sbt_request(host=HOST, token=token, invoice_files=invoice_files, imei_files=imei_files, ensure_success=False) assert "Limit reached. Number of imei_file limit at 2" in str(data["data"])