Closed nkovshov closed 7 years ago
I've found that there are few missing test cases for settings.USE_TZ = None
or empty active timezone, I'll add them, but exist set of tests lets check needed logic.
Adam, maybe we should just test get_field_value
method on this ConditionSet's?
We already have tests on OnOrAfterDate
and BeforeDate
conditions in other tests and my tests on ConditionSet's looks too complicated.
What are your thoughts?
Yeah that sounds sensible
@adamchainz, please, review last changes
@adamchainz I've made requested changes
One thing I've only just realized is that of course we're only dealing with 'today' instead of 'now', that is, dates rather than datetimes. I think that since this PR is going to be useful as-is, I'm going to merge it but with name changes to represent that it's 'today' rather than 'now'.
Merged in 465407b1cb74309219d5204b5086d2f0dca6d6a7, thanks!
Released on PyPI as 1.2.7 🎉
I've added NowConditionSet which can be used to check conditions against a current date. Probably it's better to create separate issue for missed documentation on conditions.
For #36 .