From 54afc5eb6331c700936a7cca6e9b15e60abbf4ca Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 8 Apr 2013 16:09:41 -0400 Subject: [PATCH] seems like we need to purge 'filename' from both _model_data as well as xml_attributes --- common/lib/xmodule/xmodule/tests/test_export.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/lib/xmodule/xmodule/tests/test_export.py b/common/lib/xmodule/xmodule/tests/test_export.py index 443014f9ef..170a89d783 100644 --- a/common/lib/xmodule/xmodule/tests/test_export.py +++ b/common/lib/xmodule/xmodule/tests/test_export.py @@ -24,6 +24,11 @@ def strip_filenames(descriptor): """ print "strip filename from {desc}".format(desc=descriptor.location.url()) descriptor._model_data.pop('filename', None) + + if hasattr(descriptor, 'xml_attributes'): + if 'filename' in descriptor.xml_attributes: + del descriptor.xml_attributes['filename'] + for d in descriptor.get_children(): strip_filenames(d)