def test_daily(self): from datetime import datetime from pyEX.stats import daily daily() daily('201505') daily(last='5') daily(datetime.today())
def test_daily(self): from pyEX.common import PyEXception from datetime import datetime from pyEX.stats import daily with patch('requests.get') as mock: mock.return_value = MagicMock() mock.return_value.status_code = 200 daily() daily('201505') daily(last='5') daily(datetime.today()) try: daily(5) assert False except PyEXception: pass
def test_daily(self): from pyEX.common import PyEXception from datetime import datetime from pyEX.stats import daily with patch("requests.get") as mock, patch("pickle.dump"): mock.return_value = MagicMock() mock.return_value.status_code = 200 daily() daily("201505") daily(last="5") daily(datetime.today()) try: daily(5) assert False except PyEXception: pass
def test_daily(self): from datetime import datetime from pyEX.stats import daily with patch('requests.get') as mock: mock.return_value = MagicMock() mock.return_value.status_code = 200 daily() daily('201505') daily(last='5') daily(datetime.today())