Commit 8acdf532 by Martyn James

Merge pull request #7066 from edx/dcikatic/SOL-259

SOL-259 Change HTML content listed type in index from HTML Content to Te...
parents d8799057 a6433972
...@@ -270,7 +270,7 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor): ...@@ -270,7 +270,7 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor):
xblock_body["content"].update(html_body) xblock_body["content"].update(html_body)
else: else:
xblock_body["content"] = html_body xblock_body["content"] = html_body
xblock_body["content_type"] = "HTML Content" xblock_body["content_type"] = "Text"
return xblock_body return xblock_body
......
...@@ -68,7 +68,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): ...@@ -68,7 +68,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=sample_xml) descriptor = instantiate_descriptor(data=sample_xml)
self.assertEqual(descriptor.index_dictionary(), { self.assertEqual(descriptor.index_dictionary(), {
"content": {"html_content": " Hello World! ", "display_name": "Text"}, "content": {"html_content": " Hello World! ", "display_name": "Text"},
"content_type": "HTML Content" "content_type": "Text"
}) })
sample_xml_cdata = ''' sample_xml_cdata = '''
...@@ -80,7 +80,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): ...@@ -80,7 +80,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=sample_xml_cdata) descriptor = instantiate_descriptor(data=sample_xml_cdata)
self.assertEqual(descriptor.index_dictionary(), { self.assertEqual(descriptor.index_dictionary(), {
"content": {"html_content": " This has CDATA in it. ", "display_name": "Text"}, "content": {"html_content": " This has CDATA in it. ", "display_name": "Text"},
"content_type": "HTML Content" "content_type": "Text"
}) })
sample_xml_tab_spaces = ''' sample_xml_tab_spaces = '''
...@@ -91,7 +91,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): ...@@ -91,7 +91,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=sample_xml_tab_spaces) descriptor = instantiate_descriptor(data=sample_xml_tab_spaces)
self.assertEqual(descriptor.index_dictionary(), { self.assertEqual(descriptor.index_dictionary(), {
"content": {"html_content": " Text has spaces :) ", "display_name": "Text"}, "content": {"html_content": " Text has spaces :) ", "display_name": "Text"},
"content_type": "HTML Content" "content_type": "Text"
}) })
sample_xml_comment = ''' sample_xml_comment = '''
...@@ -103,7 +103,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): ...@@ -103,7 +103,7 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=sample_xml_comment) descriptor = instantiate_descriptor(data=sample_xml_comment)
self.assertEqual(descriptor.index_dictionary(), { self.assertEqual(descriptor.index_dictionary(), {
"content": {"html_content": " This has HTML comment in it. ", "display_name": "Text"}, "content": {"html_content": " This has HTML comment in it. ", "display_name": "Text"},
"content_type": "HTML Content" "content_type": "Text"
}) })
sample_xml_mix_comment_cdata = ''' sample_xml_mix_comment_cdata = '''
...@@ -118,5 +118,5 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase): ...@@ -118,5 +118,5 @@ class HtmlDescriptorIndexingTestCase(unittest.TestCase):
descriptor = instantiate_descriptor(data=sample_xml_mix_comment_cdata) descriptor = instantiate_descriptor(data=sample_xml_mix_comment_cdata)
self.assertEqual(descriptor.index_dictionary(), { self.assertEqual(descriptor.index_dictionary(), {
"content": {"html_content": " This has HTML comment in it. HTML end. ", "display_name": "Text"}, "content": {"html_content": " This has HTML comment in it. HTML end. ", "display_name": "Text"},
"content_type": "HTML Content" "content_type": "Text"
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment