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

View File

@ -75,7 +75,6 @@ def test_middleware_response_exception():
assert response.text == 'OK' assert response.text == 'OK'
assert result['status_code'] == 404 assert result['status_code'] == 404
def test_middleware_override_request(): def test_middleware_override_request():
app = Sanic('test_middleware_override_request') app = Sanic('test_middleware_override_request')
@ -110,6 +109,7 @@ def test_middleware_override_response():
assert response.text == 'OK' assert response.text == 'OK'
def test_middleware_order(): def test_middleware_order():
app = Sanic('test_middleware_order') app = Sanic('test_middleware_order')
@ -146,4 +146,4 @@ def test_middleware_order():
request, response = app.test_client.get('/') request, response = app.test_client.get('/')
assert response.status == 200 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('/') @app.route('/')
def handler(request): def handler(request):
return json({'user': request.get('user'), return json({'user': request.get('user'), 'sidekick': request.get('sidekick')})
'sidekick': request.get('sidekick')})
request, response = app.test_client.get('/') request, response = app.test_client.get('/')

View File

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