From 4f1e9901a6af4d7c498bf5106bf560ee1da9a845 Mon Sep 17 00:00:00 2001 From: Patryk Kocielnik Date: Thu, 19 Dec 2024 21:08:34 +0100 Subject: [PATCH] Simplify tests. --- tests/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 8aaa63a..ec31c12 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -22,7 +22,7 @@ def test_get_data(): res = test_client.get('/api/ticker/nvda') assert res.status_code == 200 - data = json.loads(res.text) + data = res.json assert data['debt_payoff_time'] >= 0 assert data['sticker_price'] > 0.0 assert data['payback_time'] > 1 @@ -44,4 +44,4 @@ def test_ten_cap_price_has_two_places_precision(): price = res.json['ten_cap_price'] - assert round(price, 2) == price \ No newline at end of file + assert round(price, 2) == price