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_blank_image(): invoice_files = [ "test_samples/test_04/blank_image.png" ] imei_files = [ "test_samples/test_04/blank_image.png" ] data = make_sbt_request(host=HOST, token=token, invoice_files=invoice_files, imei_files=imei_files, ensure_success=False) response_data = data["data"]["data"] document = response_data["document"][0] assert not get_field(document, "retailername") assert not get_field(document, "sold_to_party") assert not get_field(document, "purchase_date") assert not get_field(document, "imeis")