diff --git a/tests/steps/pages.py b/tests/steps/pages.py index 9feeaeec91e7ee13c1854e921edabf0b0c4e6404..e4751715233ae7e54006cefb34fd93d723443f2f 100644 --- a/tests/steps/pages.py +++ b/tests/steps/pages.py @@ -54,7 +54,8 @@ def assert_not_exist(context: Context, path: str) -> None: "--post_type=post,page", "--post_status=publish", ] urls = {*context.site.backend.cli(*cmd, deserialiser=JSONArray.from_string)} - assert context.site.url / path not in urls + assert context.site.url / path not in urls, \ + f"{context.site.url / path} exists" @given("a {post_type:PostType} exists containing") diff --git a/tests/steps/request_steps.py b/tests/steps/request_steps.py index b39b2329606c1ca4c6803fd20e33ac390849bc5d..02c36e498be419a9856b9b985f4db5ad108206f1 100644 --- a/tests/steps/request_steps.py +++ b/tests/steps/request_steps.py @@ -77,4 +77,5 @@ def assert_response(context: Context, response: ResponseCode) -> None: "response" can be a numeric or phrasal response in ResponseCode """ - assert context.response.status_code == response + assert context.response.status_code == response, \ + f"Expected response {response}: got {context.response.status_code}"