diff --git a/tests/test_tiingo.py b/tests/test_tiingo.py index 2cf4c65..6a6f5cc 100644 --- a/tests/test_tiingo.py +++ b/tests/test_tiingo.py @@ -100,7 +100,7 @@ class TestTickerPrices(TestCase): @vcr.use_cassette('tests/fixtures/ticker_price_with_volume_column.yaml') def test_ticker_price_with_volume_column(self): - """Confirm that CSV endpoint works""" + """Confirm that requesting a single column works""" prices = self._client.get_ticker_price("GOOGL", columns="volume", fmt='json') @@ -114,7 +114,7 @@ class TestTickerPrices(TestCase): @vcr.use_cassette('tests/fixtures/ticker_price_with_multiple_columns.yaml') def test_ticker_price_with_multiple_columns(self): - """Confirm that CSV endpoint works""" + """Confirm that requesting specific columns works""" prices = self._client.get_ticker_price("GOOGL", columns="open,high,low,close,volume", fmt='json') diff --git a/tests/test_tiingo_pandas.py b/tests/test_tiingo_pandas.py index da7b9d4..8c24ce7 100644 --- a/tests/test_tiingo_pandas.py +++ b/tests/test_tiingo_pandas.py @@ -116,21 +116,23 @@ class TestTiingoWithPython(TestCase): @vcr.use_cassette('tests/fixtures/ticker_price_with_volume_column.yaml') def test_get_dataframe_with_volume_column(self): - """Confirm that CSV endpoint works""" + """Confirm that requesting a single column works""" + requested_column = "volume" prices = self._client.get_dataframe("GOOGL", - columns="volume", + columns=requested_column, fmt='json') assert len(prices) == 1 - assert len(prices.columns) == 2 + assert len(prices.columns) == len(requested_column) + 1 @vcr.use_cassette('tests/fixtures/ticker_price_with_multiple_columns.yaml') def test_get_dataframe_with_multiple_columns(self): - """Confirm that CSV endpoint works""" + """Confirm that requesting specific columns works""" + requested_columns = "open,high,low,close,volume" prices = self._client.get_dataframe("GOOGL", - columns="open,high,low,close,volume", + columns=requested_columns, fmt='json') assert len(prices) == 1 - assert len(prices.columns) == 6 + assert len(prices.columns) == len(requested_columns.split(",")) + 1 def test_metric_name_column_error(self): with self.assertRaises(APIColumnNameError):