diff --git a/tests/test_tiingo.py b/tests/test_tiingo.py index 6a6f5cc..4d56b5f 100644 --- a/tests/test_tiingo.py +++ b/tests/test_tiingo.py @@ -115,10 +115,12 @@ class TestTickerPrices(TestCase): @vcr.use_cassette('tests/fixtures/ticker_price_with_multiple_columns.yaml') def test_ticker_price_with_multiple_columns(self): """Confirm that requesting specific columns works""" + requested_columns = "open,high,low,close,volume" prices = self._client.get_ticker_price("GOOGL", - columns="open,high,low,close,volume", + columns=requested_columns, fmt='json') assert len(prices) == 1 + assert len(prices[0]) == len(requested_columns.split(',')) + 1 assert prices[0].get('date') assert prices[0].get('high') assert prices[0].get('low') diff --git a/tests/test_tiingo_pandas.py b/tests/test_tiingo_pandas.py index 8c24ce7..7e69d73 100644 --- a/tests/test_tiingo_pandas.py +++ b/tests/test_tiingo_pandas.py @@ -132,7 +132,7 @@ class TestTiingoWithPython(TestCase): columns=requested_columns, fmt='json') assert len(prices) == 1 - assert len(prices.columns) == len(requested_columns.split(",")) + 1 + assert len(prices.columns) == len(requested_columns.split(',')) def test_metric_name_column_error(self): with self.assertRaises(APIColumnNameError):