diff --git a/cope2n-api/fwd_api/celery_worker/process_report_tasks.py b/cope2n-api/fwd_api/celery_worker/process_report_tasks.py index 506762d..9c919de 100755 --- a/cope2n-api/fwd_api/celery_worker/process_report_tasks.py +++ b/cope2n-api/fwd_api/celery_worker/process_report_tasks.py @@ -112,7 +112,7 @@ def create_accuracy_report(report_id, **kwargs): continue request_att, _report_files = calculate_a_request(report, request) report_files += _report_files - report_engine.add(request, _report_files) + report_engine.add(request, _report_files, report) request.feedback_accuracy = {"imei_number": mean_list(request_att["acc"]["feedback"].get("imei_number", [None])), "purchase_date": mean_list(request_att["acc"]["feedback"].get("purchase_date", [None])), "retailername": mean_list(request_att["acc"]["feedback"].get("retailername", [None])), diff --git a/tests/utils.py b/tests/utils.py index 0dc3518..436c794 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -24,7 +24,7 @@ def login(host, username, password): return token -def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_success=True): +def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_success=True, sub=None): files = [] if invoice_files: for file in invoice_files: @@ -35,6 +35,8 @@ def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_su num_files = len(files) files.append(('processType', '12')) files.append(('is_test_request', 'True')) + if sub: + files.append(("subsidiary", sub)) start_time = time.time() end_of_upload_time = 0