Esempio n. 1
0
 def test_is_trading_datetime(self):
     self.assertTrue(stockdate.is_trading_datetime(datetime(2015, 8, 31, 9, 35, 21)))
     self.assertFalse(stockdate.is_trading_datetime(datetime(2015, 8, 31, 12, 0, 21)))
     self.assertFalse(stockdate.is_trading_datetime(datetime(2015, 9, 3, 9, 35, 21)))
     self.assertFalse(stockdate.is_trading_datetime(datetime(2015, 5, 1, 9, 35, 21)))
     self.assertFalse(stockdate.is_trading_datetime(datetime(2015, 8, 31, 15, 35, 21)))
Esempio n. 2
0
 def update_all_data(self):
     now = datetime.now()
     if (stockdate.is_trading_date(now) and now.hour >= 15
             or stockdate.is_trading_datetime(now)):
         self.update_funda(now)
Esempio n. 3
0
 def update_all_data(self):
     now = datetime.now()
     if (stockdate.is_trading_date(now) and now.hour >= 15
             or stockdate.is_trading_datetime(now)):
         self.update_funda(now)