Beispiel #1
0
 def test_at_dawn(self, next, at):
     handler = MagicMock()
     location = Astral()[LOCATION]
     timers.at_dawn(handler)
     next.assert_called_once_with(location.dawn(local=False).timetz())
     at.assert_called_once_with(next.return_value, handler)
     handler.assert_not_called()
Beispiel #2
0
def at_dawn(handler):
    location = Astral()[LOCATION]
    dawn = next(location.dawn(local=False).timetz())
    return at(dawn, handler)