-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from ceallen/72-native-cron-scheduler-doesnt-…
…match-convention Convert UNIX style crontab days-of-week to APScheduler format
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from notebooker.web.routes.scheduling import convert_day_of_week | ||
|
||
|
||
def test_weekdays(): | ||
result = convert_day_of_week("1-5") | ||
assert result == "0-4" | ||
|
||
|
||
def test_sunday(): | ||
result = convert_day_of_week("0") | ||
assert result == "6" | ||
|
||
|
||
def test_string_days(): | ||
result = convert_day_of_week("MON-FRI") | ||
assert result == "MON-FRI" |