[x] We should use factory functions a lot more for setup, instead of relying on fixtures of any kind. This includes stuff set up by mixins like DefaultApplicationsMixin and ReferenceSetupMixin
[x] The current setup functions and tests often implicitly depend on other setup code, instead of explicitly creating the things under test. (e.g. everything that uses default_camp_1 etc). Instead we should just create what we need.
[ ] Test should not depend implicitly on settings like LATE_BOOKING_THRESHOLD, but explicitly use them.
[x] Instead of magical ways of moving camp dates around (such as CurrentCampsMixin and set_thisyear), we should use time-machine everywhere. Where needed, tests should start with setting the date. Factory functions for camp should probably gain a this_summer=True kwarg for intelligently setting up a camp during typical summer season.
[X] Use pytest style assertions - done in 0609fca6
Rewrites to use new style:
[X] cciw/bookings/tests.py - mostly done in 1b00dceb . Doesn't use time-machine yet, but mostly doesn't need it.
DefaultApplicationsMixin
andReferenceSetupMixin
default_camp_1
etc). Instead we should just create what we need.LATE_BOOKING_THRESHOLD
, but explicitly use them.CurrentCampsMixin
andset_thisyear
), we should use time-machine everywhere. Where needed, tests should start with setting the date. Factory functions for camp should probably gain athis_summer=True
kwarg for intelligently setting up a camp during typical summer season.Rewrites to use new style: