@@ -34,17 +34,15 @@ class TestLiveness(unittest.TestCase):
34
34
def test_get_stock_price (self ):
35
35
# Test case for liveness of get_stock_price function
36
36
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 )
39
39
self .assertIsNotNone (stock_price )
40
40
41
41
def test_get_financial_sentiment (self ):
42
42
# Test case for liveness of get_financial_sentiment function
43
43
company = 'AAPL' # Specify the company symbol
44
44
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 )
48
46
self .assertIsNotNone (overall_strength )
49
47
50
48
if __name__ == '__main__' :
@@ -85,17 +83,16 @@ class TestLiveness(unittest.TestCase):
85
83
def test_get_stock_price (self ):
86
84
# Test case for liveness of get_stock_price function
87
85
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 )
90
88
self .assertIsNotNone (stock_price )
91
89
92
90
def test_get_financial_sentiment (self ):
93
91
# Test case for liveness of get_financial_sentiment function
94
92
company = 'AAPL' # Specify the company symbol
95
93
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 )
99
96
self .assertIsNotNone (overall_strength )
100
97
101
98
if __name__ == '__main__' :
0 commit comments