Skip to content

Commit

Permalink
Merge pull request #149 from jmcarp/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
sloria authored Jun 22, 2019
2 parents d8cb658 + fe72695 commit a9f3821
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def path(self, app, spec, function_view):
return spec._paths['/bands/{band_id}/']

def test_responses(self, schemas, path):
response = path['delete']['responses'][204]
response = path['delete']['responses']['204']
assert response['description'] == 'a deleted band'
assert response['schema'] == {}

Expand Down
4 changes: 3 additions & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ def test_schemas_none(self, app, client, models, schemas):
class ConcreteResource(MethodResource):
@marshal_with(None, code=204)
def delete(self, **kwargs):
return make_response('', 204)
response = make_response('', 204)
response.headers = {}
return response

app.add_url_rule('/<id>/', view_func=ConcreteResource.as_view('concrete'))
res = client.delete('/5/')
Expand Down

0 comments on commit a9f3821

Please sign in to comment.