コード例 #1
0
ファイル: timers_test.py プロジェクト: genus-machina/talons
 def test_at_dusk(self, next, at):
     handler = MagicMock()
     location = Astral()[LOCATION]
     timers.at_dusk(handler)
     next.assert_called_once_with(location.dusk(local=False).timetz())
     at.assert_called_once_with(next.return_value, handler)
     handler.assert_not_called()
コード例 #2
0
ファイル: timers.py プロジェクト: genus-machina/talons
def at_dusk(handler):
    location = Astral()[LOCATION]
    dusk = next(location.dusk(local=False).timetz())
    return at(dusk, handler)