From 0b1e214135303bf6302f3e1a01687a36543f7e77 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 30 Sep 2021 19:32:18 -0400 Subject: [PATCH] Fix flast wiring test --- tests/unit/wiring/test_wiringflask_py36.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit/wiring/test_wiringflask_py36.py b/tests/unit/wiring/test_wiringflask_py36.py index 1eaaa4d8..586ade16 100644 --- a/tests/unit/wiring/test_wiringflask_py36.py +++ b/tests/unit/wiring/test_wiringflask_py36.py @@ -1,17 +1,18 @@ import unittest +import json # Runtime import to avoid syntax errors in samples on Python < 3.5 and reach top-dir import os _TOP_DIR = os.path.abspath( os.path.sep.join(( os.path.dirname(__file__), - '../', + "../", )), ) _SAMPLES_DIR = os.path.abspath( os.path.sep.join(( os.path.dirname(__file__), - '../samples/', + "../samples/", )), ) import sys @@ -27,7 +28,7 @@ class WiringFlaskTest(unittest.TestCase): client = web.app.test_client() with web.app.app_context(): - response = client.get('/') + response = client.get("/") self.assertEqual(response.status_code, 200) - self.assertEqual(response.data, b'{"result":"Ok"}\n') + self.assertEqual(json.loads(response.data), {"result": "Ok"})