From a6433972755f11782737a366c5f22a89d33da549 Mon Sep 17 00:00:00 2001 From: Dino Cikatic Date: Mon, 23 Feb 2015 13:30:14 +0100 Subject: [PATCH] SOL-259 Change HTML content listed type in index from HTML Content to Text --- common/lib/xmodule/xmodule/html_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_html_module.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 13ca86894b..7e19b15ab2 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -270,7 +270,7 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor): xblock_body["content"].update(html_body) else: xblock_body["content"] = html_body - xblock_body["content_type"] = "HTML Content" + xblock_body["content_type"] = "Text" return xblock_body diff --git a/common/lib/xmodule/xmodule/tests/test_html_module.py b/common/lib/xmodule/xmodule/tests/test_html_module.py index e55882ebe5..fe6828e89f 100644 --- a/common/lib/xmodule/xmodule/tests/test_html_module.py +++ b/common/lib/xmodule/xmodule/tests/test_html_module.py @@ -68,7 +68,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): descriptor = instantiate_descriptor(data=sample_xml) self.assertEqual(descriptor.index_dictionary(), { "content": {"html_content": " Hello World! ", "display_name": "Text"}, - "content_type": "HTML Content" + "content_type": "Text" }) sample_xml_cdata = ''' @@ -80,7 +80,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): descriptor = instantiate_descriptor(data=sample_xml_cdata) self.assertEqual(descriptor.index_dictionary(), { "content": {"html_content": " This has CDATA in it. ", "display_name": "Text"}, - "content_type": "HTML Content" + "content_type": "Text" }) sample_xml_tab_spaces = ''' @@ -91,7 +91,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): descriptor = instantiate_descriptor(data=sample_xml_tab_spaces) self.assertEqual(descriptor.index_dictionary(), { "content": {"html_content": " Text has spaces :) ", "display_name": "Text"}, - "content_type": "HTML Content" + "content_type": "Text" }) sample_xml_comment = ''' @@ -103,7 +103,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): descriptor = instantiate_descriptor(data=sample_xml_comment) self.assertEqual(descriptor.index_dictionary(), { "content": {"html_content": " This has HTML comment in it. ", "display_name": "Text"}, - "content_type": "HTML Content" + "content_type": "Text" }) sample_xml_mix_comment_cdata = ''' @@ -118,5 +118,5 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): descriptor = instantiate_descriptor(data=sample_xml_mix_comment_cdata) self.assertEqual(descriptor.index_dictionary(), { "content": {"html_content": " This has HTML comment in it. HTML end. ", "display_name": "Text"}, - "content_type": "HTML Content" + "content_type": "Text" })