コード例 #1
0
 def test_populate_lists(self):
     """
     Tests if lists are properly populated
     """
     edx.populate_lists(['business-management'])
     self.assertEquals(len(edx.all_subjects), 25)
     self.assertTrue('The Analytics Edge' in edx.title_list)
コード例 #2
0
 def test_add_to_django(self):
     """
     Test if data from lists are properly added to Django database
     """
     edx.populate_lists(['business-management'])
     edx.add_to_django()
     edge_course = Course.objects.filter(name='The Analytics Edge')
     self.assertTrue(edge_course.exists())