Merge branch 'master' into 977

This commit is contained in:
Raphael Deem
2017-10-25 22:18:25 -07:00
committed by GitHub
12 changed files with 75 additions and 39 deletions

View File

@@ -27,6 +27,16 @@ def test_sync():
assert response.text == 'Hello'
def test_remote_address():
app = Sanic('test_text')
@app.route('/')
def handler(request):
return text("{}".format(request.ip))
request, response = app.test_client.get('/')
assert response.text == '127.0.0.1'
def test_text():
app = Sanic('test_text')