Skip to content

Commit

Permalink
Rename test_edr_position_extent and adjust debug log.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Falk-Petersen committed Sep 26, 2024
1 parent b945d82 commit b5cd09d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sedr/schemat.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ def test_openapi(case):


@schemathesis.hook
def after_call(self, response, case):
def after_call(context, case, response):
"""Hook runs after any call to the API."""
if case.request:
if response.request:
# Log calls with status
util.logger.debug(
"after_call URL %s gave %s - %s",
case.request.path_url,
case.status_code,
case.text[0:150],
f"after_call {'OK' if response.ok else 'ERR'} " + \
f"{response.request.path_url} {response.text[0:150]}"
)


Expand Down Expand Up @@ -188,7 +186,7 @@ def test_edr_collections(case):

@schema.include(path_regex="/position$").parametrize()
@settings(max_examples=util.args.iterations, deadline=None)
def test_edr_positions(case):
def test_edr_position_extent(case):
"""The default test in function test_openapi will fuzz the coordinates.
This function will test response given by coords inside and outside of the extent.
Expand Down

0 comments on commit b5cd09d

Please sign in to comment.