Skip to content

Commit fab228c

Browse files
committed
Merge branch 'feature/PI-606-changelog_add_an_mhs' into release/2024-12-16
2 parents 5be7fcf + 6b96ba7 commit fab228c

File tree

206 files changed

+4652
-9133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+4652
-9133
lines changed

src/api/createDeviceMessageHandlingSystem/tests/test_index.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
QuestionnaireRepository,
2424
)
2525
from event.json import json_loads
26-
from sds.epr.constants import MHS_DEVICE_SUFFIX, EprNameTemplate
26+
from sds.epr.constants import EprNameTemplate
27+
from sds.epr.utils import is_mhs_device
2728

2829
from test_helpers.dynamodb import mock_table
2930
from test_helpers.uuid import consistent_uuid
@@ -210,7 +211,7 @@ def test_index() -> None:
210211
device = Device(**_device)
211212
assert device.product_team_id == product.product_team_id
212213
assert device.product_id == product.id
213-
assert device.name.endswith(MHS_DEVICE_SUFFIX)
214+
assert is_mhs_device(device)
214215
assert device.ods_code == ODS_CODE
215216
assert device.created_on.date() == datetime.today().date()
216217
assert device.updated_on.date() == datetime.today().date()

src/etl/sds/tests/_test_sds_etl_components.py

Lines changed: 0 additions & 326 deletions
This file was deleted.

src/etl/sds/tests/changelog/changelog_components/add/message_handling_system.AnotherWithSameUniqueIdentifier.ldif

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ nhsMhsSvcIA: urn:nhs:names:services:ers:ABCDEFG
2121
nhsProductKey: 11929
2222
nhsProductVersion: Mar2023
2323
nhsRequestorURP: uniqueidentifier=555050304105,uniqueidentifier=555008548101,uid=555008545108,ou=people, o=nhs
24+
nhsMhsManufacturerOrg: LSP04
2425
uniqueIdentifier: 00000a84594b2ef34279

src/etl/sds/tests/changelog/changelog_components/add/message_handling_system.ldif

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ nhsMhsSvcIA: urn:nhs:names:services:ers:READ_PRACTITIONER_ROLE_R4_V001
2121
nhsProductKey: 11929
2222
nhsProductVersion: Mar2023
2323
nhsRequestorURP: uniqueidentifier=555050304105,uniqueidentifier=555008548101,uid=555008545108,ou=people, o=nhs
24+
nhsMhsManufacturerOrg: C3O9X
2425
uniqueIdentifier: 00000a84594b2ef34279

src/etl/sds/tests/changelog/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def extract_handler(scenario: Scenario, s3_client: S3Client):
8181
{"ETL_BUCKET": ETL_BUCKET, "AWS_DEFAULT_REGION": "us-east-1"},
8282
clear=True,
8383
):
84-
from etl.sds.worker.extract import extract
84+
from etl.sds.worker.update.extract_update import extract_update
8585

86-
extract.ENVIRONMENT = WorkerEnvironment.build()
87-
extract.S3_CLIENT = s3_client
88-
yield extract.handler
86+
extract_update.ENVIRONMENT = WorkerEnvironment.build()
87+
extract_update.S3_CLIENT = s3_client
88+
yield extract_update.handler
8989

9090

9191
@pytest.fixture
@@ -97,7 +97,7 @@ def transform_handler(scenario: Scenario):
9797
os.environ["ETL_BUCKET"] = etl_bucket
9898
os.environ["TABLE_NAME"] = read_terraform_output("dynamodb_table_name.value")
9999

100-
from etl.sds.worker.transform_update import transform_update
100+
from etl.sds.worker.update.transform_update import transform_update
101101

102102
transform_update.S3_CLIENT.put_object(
103103
Bucket=etl_bucket,
@@ -122,7 +122,7 @@ def load_handler(scenario: Scenario):
122122
os.environ["ETL_BUCKET"] = read_terraform_output("sds_etl.value.bucket")
123123
os.environ["TABLE_NAME"] = read_terraform_output("dynamodb_table_name.value")
124124

125-
from etl.sds.worker.load_update import load_update
125+
from etl.sds.worker.update.load_update import load_update
126126

127127
yield load_update.handler
128128
os.environ = original_environ

0 commit comments

Comments
 (0)