Initialize LearningContent description with RichText

This commit is contained in:
Elia Bieri 2023-05-16 16:18:02 +02:00
parent 7cc235323b
commit 45a27332cd
1 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,5 @@
import wagtail_factories import wagtail_factories
from wagtail.rich_text import RichText
from vbv_lernwelt.learnpath.models import ( from vbv_lernwelt.learnpath.models import (
Circle, Circle,
@ -86,7 +87,7 @@ class LearningUnitFactory(wagtail_factories.PageFactory):
class LearningContentAttendanceDayFactory(wagtail_factories.PageFactory): class LearningContentAttendanceDayFactory(wagtail_factories.PageFactory):
title = "Platzhalter Inhalt" title = "Platzhalter Inhalt"
minutes = 15 minutes = 15
description = "Platzhalter Beschreibung" description = RichText("Platzhalter Beschreibung")
content_url = "" content_url = ""
class Meta: class Meta:
@ -97,7 +98,7 @@ class LearningContentVideoFactory(wagtail_factories.PageFactory):
title = "Platzhalter Video" title = "Platzhalter Video"
minutes = 15 minutes = 15
content_url = "https://www.youtube.com/embed/qhPIfxS2hvI" content_url = "https://www.youtube.com/embed/qhPIfxS2hvI"
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." description = RichText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
class Meta: class Meta:
model = LearningContentVideo model = LearningContentVideo
@ -107,7 +108,7 @@ class LearningContentPlaceholderFactory(wagtail_factories.PageFactory):
title = "Platzhalter Video" title = "Platzhalter Video"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "Platzhalter" description = RichText("Platzhalter")
class Meta: class Meta:
model = LearningContentPlaceholder model = LearningContentPlaceholder
@ -117,7 +118,7 @@ class LearningContentFeedbackFactory(wagtail_factories.PageFactory):
title = "Feedback" title = "Feedback"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentFeedback model = LearningContentFeedback
@ -127,7 +128,7 @@ class LearningContentLearningModuleFactory(wagtail_factories.PageFactory):
title = "Beispiel Lernmodul" title = "Beispiel Lernmodul"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentLearningModule model = LearningContentLearningModule
@ -137,7 +138,7 @@ class LearningContentMediaLibraryFactory(wagtail_factories.PageFactory):
title = "Mediathek" title = "Mediathek"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentMediaLibrary model = LearningContentMediaLibrary
@ -147,7 +148,7 @@ class LearningContentTestFactory(wagtail_factories.PageFactory):
title = "Fachcheck" title = "Fachcheck"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentTest model = LearningContentTest
@ -157,7 +158,7 @@ class LearningContentRichTextFactory(wagtail_factories.PageFactory):
title = "Rich Text" title = "Rich Text"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentRichText model = LearningContentRichText
@ -167,7 +168,7 @@ class LearningContentAssignmentFactory(wagtail_factories.PageFactory):
title = "Geleitete Fallarbeit" title = "Geleitete Fallarbeit"
minutes = 15 minutes = 15
content_url = "" content_url = ""
description = "" description = RichText("")
class Meta: class Meta:
model = LearningContentAssignment model = LearningContentAssignment