예제 #1
0
 def test_summary(self):
     from datetime import datetime
     from pyEX.common import PyEXception
     from pyEX.stats import summary
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         summary()
         summary('201505')
         summary(datetime.today())
         try:
             summary(5)
             assert False
         except PyEXception:
             pass
예제 #2
0
 def test_summary(self):
     from datetime import datetime
     from pyEX.stats import summary
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         summary()
         summary('201505')
         summary(datetime.today())
예제 #3
0
파일: test_api.py 프로젝트: Sdoof/pyEX
 def test_summary(self):
     from datetime import datetime
     from pyEX.stats import summary
     summary()
     summary('201505')
     summary(datetime.today())