From ad21cb4588cfc39969acb6f76acce2d3850d3bd3 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 6 Oct 2022 18:25:14 +0200 Subject: [PATCH] Disable failing unit test that's difficult to write --- .../tests/test_duplicate_content_blocks.py | 209 +++++++++--------- 1 file changed, 105 insertions(+), 104 deletions(-) diff --git a/server/books/tests/test_duplicate_content_blocks.py b/server/books/tests/test_duplicate_content_blocks.py index 4d372507..7c049102 100644 --- a/server/books/tests/test_duplicate_content_blocks.py +++ b/server/books/tests/test_duplicate_content_blocks.py @@ -79,107 +79,108 @@ class DuplicateContentBlockTestCase(SkillboxTestCase): self.assertTrue('Kopie' in content_blocks[0].get('title')) self.assertTrue('Kopie' not in content_blocks[1].get('title')) - def test_duplicate_non_editable_contents(self): - # contents__0__text_block__text - nested_form_data({ - 'content': streamfield([ - nested_form_data({ - 'text_block': [ - ('text', rich_text('Asdf')) - ] - }) - ]) - }) - - contents = [ - nested_form_data({ - 'text_block': streamfield([ - ('text', 'Asdf') - ]) - }), - # { - # "type": "text_block", - # "value": { - # "text": "Asdf" - # }, - # }, - # { - # "type": "assignment", - # "value": { - # "title": "Ein Auftragstitel", - # "assignment": "Ein Auftrag", - # }, - # }, - # { - # "type": "image_block", - # "value": { - # "path": "/media/original_images/dummy_pZUH02q.jpg" - # }, - # }, - # { - # "type": "image_url_block", - # "value": { - # "title": "Asdf", - # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" - # }, - # }, - # { - # "type": "link_block", - # "value": { - # "text": "Asdf", - # "url": "https://iterativ.ch" - # }, - # }, - # { - # "type": "solution", - # "value": { - # "text": "Asdf", - # }, - # }, - # { - # "type": "video_block", - # "value": { - # "url": "https://www.youtube.com/watch?v=QxQBWR7sntI" - # }, - # }, - # { - # "type": "document_block", - # "value": { - # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" - # }, - # }, - # { - # "type": "infogram_block", - # "value": { - # "id": "4405271e-dbfb-407e-ac19-0a238cde393f", - # "title": "Gerät Internetnutzung Jungen" - # }, - # }, - # { - # "type": "thinglink_block", - # "value": { - # "id": "1314204266449076227" - # }, - # }, - # { - # "type": "subtitle", - # "value": { - # "text": "Subtitle" - # }, - # }, - # { - # "type": "instruction", - # "value": { - # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg", - # "text": "Instruction", - # }, - # }, - # { - # "type": "module_room_slug", - # "value": { - # "title": "Raum", - # }, - # }, - ] - self.content_block.contents = contents - self.assertTrue(False) + # def test_duplicate_non_editable_contents(self): + # # todo: find out how to create contents for tests, then re-enable + # # contents__0__text_block__text + # nested_form_data({ + # 'content': streamfield([ + # nested_form_data({ + # 'text_block': [ + # ('text', rich_text('Asdf')) + # ] + # }) + # ]) + # }) + # + # contents = [ + # nested_form_data({ + # 'text_block': streamfield([ + # ('text', 'Asdf') + # ]) + # }), + # # { + # # "type": "text_block", + # # "value": { + # # "text": "Asdf" + # # }, + # # }, + # # { + # # "type": "assignment", + # # "value": { + # # "title": "Ein Auftragstitel", + # # "assignment": "Ein Auftrag", + # # }, + # # }, + # # { + # # "type": "image_block", + # # "value": { + # # "path": "/media/original_images/dummy_pZUH02q.jpg" + # # }, + # # }, + # # { + # # "type": "image_url_block", + # # "value": { + # # "title": "Asdf", + # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" + # # }, + # # }, + # # { + # # "type": "link_block", + # # "value": { + # # "text": "Asdf", + # # "url": "https://iterativ.ch" + # # }, + # # }, + # # { + # # "type": "solution", + # # "value": { + # # "text": "Asdf", + # # }, + # # }, + # # { + # # "type": "video_block", + # # "value": { + # # "url": "https://www.youtube.com/watch?v=QxQBWR7sntI" + # # }, + # # }, + # # { + # # "type": "document_block", + # # "value": { + # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" + # # }, + # # }, + # # { + # # "type": "infogram_block", + # # "value": { + # # "id": "4405271e-dbfb-407e-ac19-0a238cde393f", + # # "title": "Gerät Internetnutzung Jungen" + # # }, + # # }, + # # { + # # "type": "thinglink_block", + # # "value": { + # # "id": "1314204266449076227" + # # }, + # # }, + # # { + # # "type": "subtitle", + # # "value": { + # # "text": "Subtitle" + # # }, + # # }, + # # { + # # "type": "instruction", + # # "value": { + # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg", + # # "text": "Instruction", + # # }, + # # }, + # # { + # # "type": "module_room_slug", + # # "value": { + # # "title": "Raum", + # # }, + # # }, + # ] + # self.content_block.contents = contents + # self.assertTrue(False)