Commit 4362fd1a by Will Daly

Test datetime fixups

parent 6f41e465
......@@ -20,8 +20,7 @@ class TestMessageRender(XBlockHandlerTestCase):
# Sets up all of the pre-set dates. Uses base day of today in order to allow
# comparison regardless of true date. For this reason, the dates in the XML are
# ignored and irrelevant (because we patch is_closed)
TODAY = dt.date.today()
TODAY = dt.datetime(TODAY.year, TODAY.month, TODAY.day, 0, 0, 0, tzinfo=pytz.utc)
TODAY = dt.datetime.utcnow().replace(tzinfo=pytz.utc)
TOMORROW = TODAY + dt.timedelta(days=1)
FUTURE = TODAY + dt.timedelta(days=10)
FAR_FUTURE = TODAY + dt.timedelta(days=100)
......@@ -77,10 +76,6 @@ class TestMessageRender(XBlockHandlerTestCase):
# Sets the side effect of is_closed to be our custom method, completing the patch
mock_is_closed.side_effect = closed_side_effect
# self.request(xblock, 'render_message', )
#from nose.tools import set_trace; set_trace()
xblock.render_message(None, '')
# Asserts that the message_mixin correctly derived the path and context to be rendered
......@@ -786,4 +781,4 @@ class TestMessageRender(XBlockHandlerTestCase):
self._assert_path_and_context(
xblock, expected_path, expected_context,
status, deadline_information, has_peers_to_grade
)
\ No newline at end of file
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment