16 lines
520 B
Python
16 lines
520 B
Python
|
|
from datetime import date
|
||
|
|
|
||
|
|
from snooper_monthly import load_previous_monthly_background
|
||
|
|
|
||
|
|
|
||
|
|
def test_previous_monthly_missing_only_applies_to_first_five_workdays(tmp_path):
|
||
|
|
output = {"monthly": str(tmp_path / "Monthly" / "MsgMYYYY-MM.md")}
|
||
|
|
|
||
|
|
content, missing = load_previous_monthly_background(output, date(2024, 11, 1))
|
||
|
|
assert content is None
|
||
|
|
assert missing is True
|
||
|
|
|
||
|
|
content, missing = load_previous_monthly_background(output, date(2024, 11, 27))
|
||
|
|
assert content is None
|
||
|
|
assert missing is False
|