Skip to content

Commit 128906f

Browse files
committed
Merge branch 'lcore-1329' of github.com:jrobertboos/lightspeed-stack into lcore-1329
2 parents 0701af5 + d4f4518 commit 128906f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/e2e/features/steps/common_http.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ def check_response_body_does_not_contain(context: Context, substring: str) -> No
187187
), f"The response text '{context.response.text}' contains '{substring}'"
188188

189189

190+
@then("The body of the response does not contain {substring}")
191+
def check_response_body_does_not_contain(context: Context, substring: str) -> None:
192+
"""Check that response body does not contain a substring."""
193+
assert context.response is not None, "Request needs to be performed first"
194+
assert (
195+
substring not in context.response.text
196+
), f"The response text '{context.response.text}' contains '{substring}'"
197+
198+
190199
@then("The body of the response is the following")
191200
def check_prediction_result(context: Context) -> None:
192201
"""Check the content of the response to be exactly the same.

0 commit comments

Comments
 (0)