def test_serialize_item(self):
     """
     Tests the serialize_item method.
     """
     fields, label = serialize_item(self.course)
     self.assertEqual(label, "course")
     self.assertIn("edited_on", list(fields.keys()))
     self.assertIn("display_name", list(fields.keys()))
     self.assertIn("org", list(fields.keys()))
     self.assertIn("course", list(fields.keys()))
     self.assertIn("run", list(fields.keys()))
     self.assertIn("course_key", list(fields.keys()))
     self.assertIn("location", list(fields.keys()))
     self.assertIn("block_type", list(fields.keys()))
     self.assertIn("detached", list(fields.keys()))
     self.assertNotIn("checklist", list(fields.keys()))
 def test_serialize_item(self):
     """
     Tests the serialize_item method.
     """
     fields, label = serialize_item(self.course)
     self.assertEqual(label, "course")
     self.assertIn("edited_on", fields.keys())
     self.assertIn("display_name", fields.keys())
     self.assertIn("org", fields.keys())
     self.assertIn("course", fields.keys())
     self.assertIn("run", fields.keys())
     self.assertIn("course_key", fields.keys())
     self.assertIn("location", fields.keys())
     self.assertIn("block_type", fields.keys())
     self.assertIn("detached", fields.keys())
     self.assertNotIn("checklist", fields.keys())
示例#3
0
 def test_serialize_item(self):
     """
     Tests the serialize_item method.
     """
     fields, label = serialize_item(self.course)
     assert label == 'course'
     assert 'edited_on' in list(fields.keys())
     assert 'display_name' in list(fields.keys())
     assert 'org' in list(fields.keys())
     assert 'course' in list(fields.keys())
     assert 'run' in list(fields.keys())
     assert 'course_key' in list(fields.keys())
     assert 'location' in list(fields.keys())
     assert 'block_type' in list(fields.keys())
     assert 'detached' in list(fields.keys())
     assert 'checklist' not in list(fields.keys())