torchbox/wagtail — pull request #478 by gasman (2014-07-16 16:30:56+00:00)
Title: Fix scheduled publishing unit tests to not require TIME_ZONE='UTC'

This PR addresses the concern I raised in https://github.com/torchbox/wagtail/issues/416#issuecomment-47943450 and allows unit tests to run successfully with any timezone setting. The timestamps POSTed by the test client are translated to local time, which mirrors how a real user in a non-UTC timezone would interact with the admin page.

(I've also tweaked the dates used in the `test_edit_post_scheduled` test so that they're not just one day apart - since it's doing a `content_json__contains` check against the whole JSON packet, it could falsely match another datestamp within the JSON and miss an off-by-one error like this.)