File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import pytest
22
33from nrlf .core .constants import PERMISSION_ALLOW_ALL_POINTER_TYPES , V2Headers
4- from tests .smoke .environment import EnvironmentConfig , SmokeTestParameters
4+ from tests .smoke .environment import ConnectMode , EnvironmentConfig , SmokeTestParameters
55from tests .smoke .setup import build_document_reference
66from tests .utilities .api_clients import ConnectionMetadata , ProducerTestClient
77
@@ -14,7 +14,8 @@ def producer_client_1dsync(
1414) -> ProducerTestClient :
1515 client_config = environment_config .to_client_config (smoke_test_parameters )
1616
17- if environment_config .connect_mode == "internal" :
17+ if environment_config .connect_mode == ConnectMode .INTERNAL .value :
18+ # Use app-level perms in internal mode
1819 connection_metadata = ConnectionMetadata .model_validate (
1920 {
2021 "nrl.permissions" : [PERMISSION_ALLOW_ALL_POINTER_TYPES ],
@@ -31,7 +32,7 @@ def producer_client_1dsync(
3132 v2_1dsync_app_id
3233 )
3334 else :
34- # can 't use app-level perms here without setting up another apigee app, use ODS instead
35+ # Can 't use app-level perms here without setting up another apigee app, use ODS instead
3536 client_config .custom_headers ["NHSD-End-User-Organisation-ODS" ] = (
3637 "SMOKETEST1DSYNC"
3738 )
Original file line number Diff line number Diff line change 11import pytest
22
33from nrlf .core .constants import PERMISSION_ALLOW_ALL_POINTER_TYPES , V2Headers
4- from tests .smoke .environment import EnvironmentConfig , SmokeTestParameters
4+ from tests .smoke .environment import ConnectMode , EnvironmentConfig , SmokeTestParameters
55from tests .smoke .setup import build_document_reference
66from tests .utilities .api_clients import ConnectionMetadata , ProducerTestClient
77
@@ -14,7 +14,7 @@ def producer_client_1dsync_v1(
1414) -> ProducerTestClient :
1515 client_config = environment_config .to_client_config (smoke_test_parameters )
1616
17- if environment_config .connect_mode == "internal" :
17+ if environment_config .connect_mode == ConnectMode . INTERNAL . value :
1818 connection_metadata = ConnectionMetadata .model_validate (
1919 {
2020 "nrl.permissions" : [PERMISSION_ALLOW_ALL_POINTER_TYPES ],
You can’t perform that action at this time.
0 commit comments