def test_summaryDF(self): from datetime import datetime from pyEX.stats import summaryDF with patch('requests.get') as mock: mock.return_value = MagicMock() mock.return_value.status_code = 200 mock.return_value.json = MagicMock(return_value=[]) summaryDF() summaryDF('201505') summaryDF(datetime.today())
def test_summaryDF(self): from datetime import datetime from pyEX.stats import summaryDF with patch("requests.get") as mock, patch("pickle.dump"): mock.return_value = MagicMock() mock.return_value.status_code = 200 mock.return_value.json = MagicMock(return_value=[]) summaryDF() summaryDF("201505") summaryDF(datetime.today())