def test_date_summary(self): self.setup_course_and_user() block = DateSummary(self.course, self.user) html = '<div class="date-summary-container"><div class="date-summary date-summary-"></div></div>' self.assertHTMLEqual(block.render(), html) self.assertFalse(block.is_enabled)
def test_date_render(self): self.setup_course_and_user() block = DateSummary(self.course, self.user) block.date = datetime.now(pytz.UTC) self.assertIn('Jan 02, 2015', block.render())