Skip to content

Commit

Permalink
added scheduler tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Sep 18, 2020
1 parent a6111d6 commit ef99c80
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,18 @@ def test_run_at(self):
self.task._date = time

assert self.task.should_run() is False

def test_method_calls(self):
task = MockTask()
task.at('13:00')

time = pendulum.now().on(2018, 1, 1).at(13, 0, 5)
task._date = time

task = MockTask()
task.every_minute()

time = pendulum.now().on(2018, 5, 21).at(22, 5, 5)
task._date = time
assert task.should_run(time) == True

0 comments on commit ef99c80

Please sign in to comment.