Empty response body step is too restrictive
This commit is contained in:
@@ -21,4 +21,3 @@ Feature: Kapow! server reject append requests with malformed JSON bodies.
|
|||||||
"""
|
"""
|
||||||
Then I get 400 as response code
|
Then I get 400 as response code
|
||||||
And I get "Malformed JSON" as response reason phrase
|
And I get "Malformed JSON" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ Feature: Fail to delete a route in Kapow! server.
|
|||||||
When I delete the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
When I delete the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Not Found" as response reason phrase
|
And I get "Not Found" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
|||||||
When I delete the first route inserted
|
When I delete the first route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
@@ -61,7 +60,6 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
|||||||
When I delete the last route inserted
|
When I delete the last route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
@@ -103,7 +101,6 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
|||||||
When I delete the second route inserted
|
When I delete the second route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
And I get "OK" as response reason phrase
|
||||||
|
|||||||
@@ -22,4 +22,3 @@ Feature: Kapow! server reject insert requests with malformed JSON bodies.
|
|||||||
"""
|
"""
|
||||||
Then I get 400 as response code
|
Then I get 400 as response code
|
||||||
And I get "Malformed JSON" as response reason phrase
|
And I get "Malformed JSON" as response reason phrase
|
||||||
And I get an empty response body
|
|
||||||
|
|||||||
@@ -128,11 +128,6 @@ def step_impl(context):
|
|||||||
assert is_subset(jsonexample.loads(context.text), context.response.json())
|
assert is_subset(jsonexample.loads(context.text), context.response.json())
|
||||||
|
|
||||||
|
|
||||||
@then('I get an empty response body')
|
|
||||||
def step_impl(context):
|
|
||||||
assert context.response.content == b'', f"Response body is not empty. Got {context.response.content} instead."
|
|
||||||
|
|
||||||
|
|
||||||
@when('I delete the route with id "{id}"')
|
@when('I delete the route with id "{id}"')
|
||||||
def step_impl(context, id):
|
def step_impl(context, id):
|
||||||
context.response = requests.delete(f"{Env.KAPOW_CONTROLAPI_URL}/routes/{id}")
|
context.response = requests.delete(f"{Env.KAPOW_CONTROLAPI_URL}/routes/{id}")
|
||||||
|
|||||||
Reference in New Issue
Block a user