From af1fc800b96ff9dbc1e09ff21a59acb572a7744a Mon Sep 17 00:00:00 2001 From: Patryk Kocielnik Date: Sun, 22 Sep 2024 21:40:48 +0200 Subject: [PATCH] Add an API test for 10Cap buy price. --- tests/test_api.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index ca53b9e..b4d1573 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -22,3 +22,11 @@ def test_get_data(): data = res.text assert json.loads(data)['debt_payoff_time'] == 0 assert res.status_code == 200 + +def test_get_ten_cap_price(): + app = create_app(fetchDataForTickerSymbol) + + with app.test_client() as test_client: + test_client = app.test_client() + res = test_client.get('/api/ticker/nvda') + assert res.json['ten_cap_buy_price'] == 127.43