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