Exemplo n.º 1
0
 def enqueue_periodic_commands(self, dt=None):
     dt = dt or datetime.datetime.now()
     
     for command in registry.get_periodic_commands():
         if command.validate_datetime(dt):
             self.enqueue(command)
Exemplo n.º 2
0
 def test_registry_get_periodic_commands(self):
     # three, one for the base class, one for the TestPeriodicCommand, and
     # one for the decorated function
     self.assertEqual(len(registry.get_periodic_commands()), 3)