Merge pull request #763 from edx/fix/cdodge/strip-transient-draft-serialization-attributes

fix some gaps which would allow the temporary xml attributes 'parent_seq...
This commit is contained in:
chrisndodge
2013-08-22 11:00:55 -07:00
2 changed files with 22 additions and 7 deletions

View File

@@ -945,8 +945,17 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
'vertical', 'vertical_test', None]), depth=1)
self.assertTrue(getattr(vertical, 'is_draft', False))
self.assertNotIn('index_in_children_list', child.xml_attributes)
self.assertNotIn('parent_sequential_url', vertical.xml_attributes)
for child in vertical.get_children():
self.assertTrue(getattr(child, 'is_draft', False))
self.assertNotIn('index_in_children_list', child.xml_attributes)
if hasattr(child, 'data'):
self.assertNotIn('index_in_children_list', child.data)
self.assertNotIn('parent_sequential_url', child.xml_attributes)
if hasattr(child, 'data'):
self.assertNotIn('parent_sequential_url', child.data)
# make sure that we don't have a sequential that is in draft mode
sequential = draft_store.get_item(Location(['i4x', 'edX', 'toy',