Skip to content

Commit 47af0bb

Browse files
wwwjfyfantix
authored andcommitted
fix python-gino/gino#213, Quart extension
1 parent 5ed3775 commit 47af0bb

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/test_sanic.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import gino
2-
import sanic
3-
import pytest
41
from async_generator import yield_, async_generator
2+
import pytest
3+
import sanic
54
from sanic.response import text, json
5+
6+
import gino
67
from gino.ext.sanic import Gino
78

89
from .models import DB_ARGS, PG_URL
@@ -96,10 +97,7 @@ def test_index_returns_200_dsn(app_dsn):
9697

9798

9899
def _test(app):
99-
request, response = app.test_client.get('/users/1')
100-
assert response.status == 404
101-
102-
for method in '1234':
100+
for method in '01234':
103101
request, response = app.test_client.get('/users/1?method=' + method)
104102
assert response.status == 404
105103

@@ -108,9 +106,10 @@ def _test(app):
108106
assert response.status == 200
109107
assert response.json == dict(id=1, nickname='fantix')
110108

111-
request, response = app.test_client.get('/users/1')
112-
assert response.status == 200
113-
assert response.json == dict(id=1, nickname='fantix')
109+
for method in '01234':
110+
request, response = app.test_client.get('/users/1?method=' + method)
111+
assert response.status == 200
112+
assert response.json == dict(id=1, nickname='fantix')
114113

115114

116115
def test(app):

0 commit comments

Comments
 (0)