Commits

Luke Plant committed e1c8873

Corrected a bug in test (hard coded year)

  • Participants
  • Parent commits fd4bd33
  • Branches bookings

Comments (0)

Files changed (1)

cciw/officers/tests/applications.py

         # We have to use datetime.today(), because this is used by
         # thisyears_applications.
 
-        future_camp_start = datetime.date.today() + datetime.timedelta(100)
+        future_camp_start = datetime.date(datetime.date.today().year + 1, 8, 1)
         past_camp_start = future_camp_start - datetime.timedelta(30 * 11)
 
         site = Site.objects.get(id=1)
-        c1 = Camp.objects.create(year=2010, number=5, minimum_age=11, maximum_age=17,
+        c1 = Camp.objects.create(year=past_camp_start.year, number=5,
                                  start_date=past_camp_start,
                                  end_date=past_camp_start + datetime.timedelta(7),
+                                 minimum_age=11, maximum_age=17,
                                  site=site)
-        c2 = Camp.objects.create(year=2011, number=1, minimum_age=11, maximum_age=17,
+        c2 = Camp.objects.create(year=future_camp_start.year, number=1,
                                  start_date=future_camp_start,
                                  end_date=future_camp_start + datetime.timedelta(7),
+                                 minimum_age=11, maximum_age=17,
                                  site=site)
 
         u = User.objects.create(username='test')