Skip to content

Commit 8c7e27c

Browse files
NRL-518 Fix parameter should not be fix to content
1 parent 4005676 commit 8c7e27c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/features/steps/2_request.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ def create_post_document_reference_step(context: Context, ods_code: str):
9595

9696

9797
def _create_or_upsert_body_step(
98-
context: Context, method: str, pointer_id: str = "TSTCUS-sample-id-00000"
98+
context: Context,
99+
method: str,
100+
section: str,
101+
pointer_id: str = "TSTCUS-sample-id-00000",
99102
):
100103
client = producer_client_from_context(context, "TSTCUS")
101104

102105
if not context.text:
103106
raise ValueError("No document reference text snippet provided")
104107

105-
doc_ref = create_test_document_reference_with_defaults("content", context.text)
108+
doc_ref = create_test_document_reference_with_defaults(section, context.text)
106109
context.response = getattr(client, method)(doc_ref)
107110

108111
if context.response.status_code == 201:
@@ -117,14 +120,14 @@ def _create_or_upsert_body_step(
117120
"producer 'TSTCUS' requests creation of a DocumentReference with default test values except '{section}' is"
118121
)
119122
def create_post_body_step(context: Context, section: str):
120-
_create_or_upsert_body_step(context, "create_text")
123+
_create_or_upsert_body_step(context, "create_text", section)
121124

122125

123126
@when(
124127
"producer 'TSTCUS' requests upsert of a DocumentReference with pointerId '{pointer_id}' and default test values except '{section}' is"
125128
)
126129
def upsert_post_body_step(context: Context, section: str, pointer_id: str):
127-
_create_or_upsert_body_step(context, "upsert_text", pointer_id)
130+
_create_or_upsert_body_step(context, "upsert_text", section, pointer_id)
128131

129132

130133
@when("producer '{ods_code}' upserts a DocumentReference with values")

0 commit comments

Comments
 (0)