File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
- import gino
2
- import sanic
3
- import pytest
4
1
from async_generator import yield_ , async_generator
2
+ import pytest
3
+ import sanic
5
4
from sanic .response import text , json
5
+
6
+ import gino
6
7
from gino .ext .sanic import Gino
7
8
8
9
from .models import DB_ARGS , PG_URL
@@ -96,10 +97,7 @@ def test_index_returns_200_dsn(app_dsn):
96
97
97
98
98
99
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' :
103
101
request , response = app .test_client .get ('/users/1?method=' + method )
104
102
assert response .status == 404
105
103
@@ -108,9 +106,10 @@ def _test(app):
108
106
assert response .status == 200
109
107
assert response .json == dict (id = 1 , nickname = 'fantix' )
110
108
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' )
114
113
115
114
116
115
def test (app ):
You can’t perform that action at this time.
0 commit comments