コード例 #1
0
 def test_render_date_string_time_zone(self, delta, expected_date_string):
     self.setup_course_and_user(
         days_till_start=-10, verification_status="denied", days_till_verification_deadline=delta
     )
     set_user_preference(self.user, "time_zone", "America/Los_Angeles")
     block = VerificationDeadlineDate(self.course, self.user)
     self.assertEqual(block.get_context()["date"], expected_date_string)
コード例 #2
0
 def test_render_date_string_past(self, delta, expected_date_string):
     self.setup_course_and_user(
         days_till_start=-10,
         verification_status='denied',
         days_till_verification_deadline=delta,
     )
     block = VerificationDeadlineDate(self.course, self.user)
     self.assertEqual(block.get_context()['date'], expected_date_string)
コード例 #3
0
 def test_render_date_string_past(self, delta, expected_date_string):
     self.setup_course_and_user(
         days_till_start=-10,
         verification_status='denied',
         days_till_verification_deadline=delta,
     )
     block = VerificationDeadlineDate(self.course, self.user)
     self.assertEqual(block.get_context()['date'], expected_date_string)
コード例 #4
0
 def test_render_date_string_time_zone(self, delta, expected_date_string):
     self.setup_course_and_user(
         days_till_start=-10,
         verification_status='denied',
         days_till_verification_deadline=delta,
     )
     set_user_preference(self.user, "time_zone", "America/Los_Angeles")
     block = VerificationDeadlineDate(self.course, self.user)
     self.assertEqual(block.get_context()['date'], expected_date_string)