from behave import then
@then("the response should not be a pagination results")
[docs]
def check_not_page_result(context):
"""Check that the response is not in pagination format.
Verifies that the response doesn't contain the standard pagination fields
(content, currentPage, totalElements, totalPages).
:param context: The Behave context
:raises AssertionError: If the response has the standard pagination format
"""
response = context.request.response.json()
if all([key in response for key in PAGINATION_RESULT_KEYS]):
assert False, "result is a pagination list"