File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
import unittest
2
+ import json
2
3
3
4
# Runtime import to avoid syntax errors in samples on Python < 3.5 and reach top-dir
4
5
import os
5
6
_TOP_DIR = os .path .abspath (
6
7
os .path .sep .join ((
7
8
os .path .dirname (__file__ ),
8
- ' ../' ,
9
+ " ../" ,
9
10
)),
10
11
)
11
12
_SAMPLES_DIR = os .path .abspath (
12
13
os .path .sep .join ((
13
14
os .path .dirname (__file__ ),
14
- ' ../samples/' ,
15
+ " ../samples/" ,
15
16
)),
16
17
)
17
18
import sys
@@ -27,7 +28,7 @@ def test(self):
27
28
client = web .app .test_client ()
28
29
29
30
with web .app .app_context ():
30
- response = client .get ('/' )
31
+ response = client .get ("/" )
31
32
32
33
self .assertEqual (response .status_code , 200 )
33
- self .assertEqual (response .data , b' {"result":"Ok"}\n ' )
34
+ self .assertEqual (json . loads ( response .data ), {"result" : "Ok" })
You can’t perform that action at this time.
0 commit comments