Revert files those fixed for flake problems.

This commit is contained in:
Yaser Amiri 2017-12-26 23:35:54 +03:30
parent 81494453b0
commit 9bdf7a9980
4 changed files with 6 additions and 7 deletions

View File

@ -68,7 +68,7 @@ class ReuseableSanicTestClient(SanicTestClient):
import traceback
traceback.print_tb(e2.__traceback__)
exceptions.append(e2)
# Don't stop here! self.app.stop()
#Don't stop here! self.app.stop()
if self._server is not None:
_server = self._server
@ -266,3 +266,4 @@ def test_keep_alive_server_timeout():
assert isinstance(exception, ValueError)
assert "Connection reset" in exception.args[0] or \
"got a new connection" in exception.args[0]

View File

@ -75,7 +75,6 @@ def test_middleware_response_exception():
assert response.text == 'OK'
assert result['status_code'] == 404
def test_middleware_override_request():
app = Sanic('test_middleware_override_request')
@ -110,6 +109,7 @@ def test_middleware_override_response():
assert response.text == 'OK'
def test_middleware_order():
app = Sanic('test_middleware_order')
@ -146,4 +146,4 @@ def test_middleware_order():
request, response = app.test_client.get('/')
assert response.status == 200
assert order == [1, 2, 3, 4, 5, 6]
assert order == [1,2,3,4,5,6]

View File

@ -20,8 +20,7 @@ def test_storage():
@app.route('/')
def handler(request):
return json({'user': request.get('user'),
'sidekick': request.get('sidekick')})
return json({'user': request.get('user'), 'sidekick': request.get('sidekick')})
request, response = app.test_client.get('/')

View File

@ -188,8 +188,7 @@ def test_request_stream_handle_exception():
# 405
request, response = app.test_client.get('/post/random_id', data=data)
assert response.status == 405
assert response.text == \
'Error: Method GET not allowed for URL /post/random_id'
assert response.text == 'Error: Method GET not allowed for URL /post/random_id'
def test_request_stream_blueprint():