Skip to content

Commit 690aace

Browse files
authored
Update testing.py
1 parent 57508bb commit 690aace

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

testing.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@ class TestLiveness(unittest.TestCase):
3434
def test_get_stock_price(self):
3535
# Test case for liveness of get_stock_price function
3636
symbol = "AAPL" # Stock symbol
37-
api_key = "YOUR_API_KEY" # Your Alpha Vantage API key
38-
stock_price = get_stock_price(symbol, api_key)
37+
38+
stock_price = get_stock_price(symbol)
3939
self.assertIsNotNone(stock_price)
4040

4141
def test_get_financial_sentiment(self):
4242
# Test case for liveness of get_financial_sentiment function
4343
company = 'AAPL' # Specify the company symbol
4444
news_sources = 'bbc-news, bloomberg, cnn, reuters' # Specify news sources
45-
news_api_key = 'YOUR_NEWS_API_KEY'
46-
api_key = 'YOUR_ALPHA_VANTAGE_API_KEY'
47-
overall_strength = get_financial_sentiment(company, news_sources, news_api_key, api_key)
45+
overall_strength = get_financial_sentiment(company, news_sources)
4846
self.assertIsNotNone(overall_strength)
4947

5048
if __name__ == '__main__':
@@ -85,17 +83,16 @@ class TestLiveness(unittest.TestCase):
8583
def test_get_stock_price(self):
8684
# Test case for liveness of get_stock_price function
8785
symbol = "AAPL" # Stock symbol
88-
api_key = "YOUR_API_KEY" # Your Alpha Vantage API key
89-
stock_price = get_stock_price(symbol, api_key)
86+
87+
stock_price = get_stock_price(symbol)
9088
self.assertIsNotNone(stock_price)
9189

9290
def test_get_financial_sentiment(self):
9391
# Test case for liveness of get_financial_sentiment function
9492
company = 'AAPL' # Specify the company symbol
9593
news_sources = 'bbc-news, bloomberg, cnn, reuters' # Specify news sources
96-
news_api_key = 'YOUR_NEWS_API_KEY'
97-
api_key = 'YOUR_ALPHA_VANTAGE_API_KEY'
98-
overall_strength = get_financial_sentiment(company, news_sources, news_api_key, api_key)
94+
95+
overall_strength = get_financial_sentiment(company, news_sources)
9996
self.assertIsNotNone(overall_strength)
10097

10198
if __name__ == '__main__':

0 commit comments

Comments
 (0)