Response model now handles the 204 no content
This commit is contained in:
@@ -104,6 +104,7 @@ def test_json():
|
||||
|
||||
assert results.get('test') == True
|
||||
|
||||
|
||||
def test_empty_json():
|
||||
app = Sanic('test_json')
|
||||
|
||||
@@ -114,7 +115,7 @@ def test_empty_json():
|
||||
|
||||
request, response = app.test_client.get('/')
|
||||
assert response.status == 200
|
||||
assert response.text == ''
|
||||
assert response.text == 'null'
|
||||
|
||||
|
||||
def test_invalid_json():
|
||||
|
||||
@@ -43,7 +43,7 @@ def test_method_not_allowed():
|
||||
return response.json({'hello': 'world'})
|
||||
|
||||
request, response = app.test_client.head('/')
|
||||
assert response.headers['Allow']== 'GET'
|
||||
assert response.headers['Allow'] == 'GET'
|
||||
|
||||
@app.post('/')
|
||||
async def test(request):
|
||||
|
||||
Reference in New Issue
Block a user