Skip to content

Commit a9f3821

Browse files
authored
Merge pull request #149 from jmcarp/fix-tests
Fix tests
2 parents d8cb658 + fe72695 commit a9f3821

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/test_openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def path(self, app, spec, function_view):
154154
return spec._paths['/bands/{band_id}/']
155155

156156
def test_responses(self, schemas, path):
157-
response = path['delete']['responses'][204]
157+
response = path['delete']['responses']['204']
158158
assert response['description'] == 'a deleted band'
159159
assert response['schema'] == {}
160160

tests/test_views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def test_schemas_none(self, app, client, models, schemas):
271271
class ConcreteResource(MethodResource):
272272
@marshal_with(None, code=204)
273273
def delete(self, **kwargs):
274-
return make_response('', 204)
274+
response = make_response('', 204)
275+
response.headers = {}
276+
return response
275277

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

0 commit comments

Comments
 (0)