mysociety/fixmystreet — pull request #714 by osfameron (2014-03-13 14:24:58+00:00)
Title: Mock a date for dashboard tests

Fixes #365 (how appropriate) by mocking datetime to allow the
dashboard test's assumptions (that we're not so near beginning
of year that a report from X days ago isn't still in same year)
to hold.

The mocking lets us bypass @struan's suggestion to rethink how the tests work -- on reflection, I think this is a Good Thing (e.g. we're just using test mocking to make sure that the current assumptions hold.)

NB: Tested this fix by `sudo date -s` on my vagrant box (with some config to make sure virtualbox doesn't "helpfully" sync the date to host's) to verify failure, and rerunning with the mocked version. e.g. there's no automated test for the test.