diff --git a/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_resource.py b/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_resource.py index 8828f96ea0..d4f1dad032 100644 --- a/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_resource.py +++ b/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_resource.py @@ -19,6 +19,20 @@ def test_get_information_requirements_table_by_irt_guid(test_client, db_session, assert get_data['irt_guid'] == str(irt.irt_guid) assert get_data['status_code'] == str(irt.status_code) +def test_put_information_requirements_table(test_client, db_session, auth_headers): + project = ProjectFactory() + irt = InformationRequirementsTableFactory(project=project) + + data = { "status_code": "WDN"} + + put_resp = test_client.put( + f'/projects/{irt.project.project_guid}/information-requirements-table/{irt.irt_guid}', + data=data, + headers=auth_headers['full_auth_header']) + + assert put_resp.status_code == 200 + put_data = json.loads(put_resp.data.decode()) + assert put_data['status_code'] == data['status_code'] # TODO: Update and enable this once the workflow has matured # def test_put_information_requirements_table(test_client, db_session, auth_headers): diff --git a/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_status_resource.py b/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_status_resource.py deleted file mode 100644 index ae3eb5496c..0000000000 --- a/services/core-api/tests/projects/information_requirements_table/resources/test_information_requirements_table_status_resource.py +++ /dev/null @@ -1,23 +0,0 @@ -import json - -from tests.factories import InformationRequirementsTableFactory, ProjectFactory -from flask_restx import marshal -from app.api.projects.response_models import IRT_MODEL - - -def test_put_information_requirements_table_status(test_client, db_session, auth_headers): - project = ProjectFactory() - irt = InformationRequirementsTableFactory(project=project) - - data = marshal(project, IRT_MODEL) - - data['status_code'] = 'SUB' - - put_resp = test_client.put( - f'/projects/{irt.project.project_guid}/information-requirements-table/{irt.irt_guid}/status', - json=data, - headers=auth_headers['full_auth_header']) - - assert put_resp.status_code == 200 - put_data = json.loads(put_resp.data.decode()) - assert put_data['status_code'] == data['status_code']