コード例 #1
0
ファイル: test_views.py プロジェクト: Akif-Vohra/edx-platform
 def test_get_date(self):
     """
     Assert that get_date returns valid date.
     """
     ccx = self.make_ccx()
     for section in self.course.get_children():
         self.assertEqual(get_date(ccx, section, 'start'), self.mooc_start)
         self.assertEqual(get_date(ccx, section, 'due'), None)
         for subsection in section.get_children():
             self.assertEqual(get_date(ccx, subsection, 'start'), self.mooc_start)
             self.assertEqual(get_date(ccx, subsection, 'due'), self.mooc_due)
             for unit in subsection.get_children():
                 self.assertEqual(get_date(ccx, unit, 'start', parent_node=subsection), self.mooc_start)
                 self.assertEqual(get_date(ccx, unit, 'due', parent_node=subsection), self.mooc_due)
コード例 #2
0
 def test_get_date(self):
     """
     Assert that get_date returns valid date.
     """
     ccx = self.make_ccx()
     for section in self.course.get_children():
         self.assertEqual(get_date(ccx, section, 'start'), self.mooc_start)
         self.assertEqual(get_date(ccx, section, 'due'), None)
         for subsection in section.get_children():
             self.assertEqual(get_date(ccx, subsection, 'start'), self.mooc_start)
             self.assertEqual(get_date(ccx, subsection, 'due'), self.mooc_due)
             for unit in subsection.get_children():
                 self.assertEqual(get_date(ccx, unit, 'start', parent_node=subsection), self.mooc_start)
                 self.assertEqual(get_date(ccx, unit, 'due', parent_node=subsection), self.mooc_due)