def test_get_parent_with_category(self): """ Test test_get_parent_of_category """ result = _get_xblock_parent(self.vert1, 'sequential') self.assertEqual(result.location, self.seq1.location) result = _get_xblock_parent(self.vert1, 'chapter') self.assertEqual(result.location, self.chapter1.location)
def test_get_direct_parent(self): """ Test test_get_direct_parent """ result = _get_xblock_parent(self.vert1) self.assertEqual(result.location, self.seq1.location)
def test_get_parent_none(self): """ Test test_get_parent_none """ result = _get_xblock_parent(self.vert1, 'unit') self.assertIsNone(result)