102 lines
2.5 KiB
Python
102 lines
2.5 KiB
Python
import factory
|
|
import wagtail_factories
|
|
|
|
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit
|
|
from vbv_lernwelt.learnpath.models_learning_unit_content import VideoBlock, RiseTrainingBlock, PodcastBlock, \
|
|
CompetenceBlock, ExerciseBlock, SelfEvaluationBlock, DocumentBlock, KnowledgeBlock
|
|
|
|
|
|
class LearningPathFactory(wagtail_factories.PageFactory):
|
|
title = "Versicherungsvermittler/in"
|
|
|
|
class Meta:
|
|
model = LearningPath
|
|
|
|
|
|
class TopicFactory(factory.django.DjangoModelFactory):
|
|
title = "Gewinnen von Kunden"
|
|
is_visible = True
|
|
|
|
class Meta:
|
|
model = Topic
|
|
|
|
|
|
class CircleFactory(wagtail_factories.PageFactory):
|
|
title = "Gewinnen"
|
|
|
|
class Meta:
|
|
model = Circle
|
|
|
|
|
|
class LearningSequenceFactory(wagtail_factories.PageFactory):
|
|
title = "Grundlagen"
|
|
|
|
class Meta:
|
|
model = LearningSequence
|
|
|
|
|
|
class LearningUnitFactory(wagtail_factories.PageFactory):
|
|
title = "Herzlich Willkommen"
|
|
|
|
class Meta:
|
|
model = LearningUnit
|
|
|
|
|
|
class VideoBlockFactory(wagtail_factories.StructBlockFactory):
|
|
url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
|
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"
|
|
|
|
class Meta:
|
|
model = VideoBlock
|
|
|
|
|
|
class RiseTrainingBlockFactory(wagtail_factories.StructBlockFactory):
|
|
url = "https://www.example.com"
|
|
description = "Beispiel Rise Modul"
|
|
|
|
class Meta:
|
|
model = RiseTrainingBlock
|
|
|
|
|
|
class PodcastBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Podcast"
|
|
url = "https://docs.wagtail.org/en/stable/topics/streamfield.html"
|
|
|
|
class Meta:
|
|
model = PodcastBlock
|
|
|
|
|
|
class CompetenceBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Kompetenz"
|
|
|
|
class Meta:
|
|
model = CompetenceBlock
|
|
|
|
|
|
class ExerciseBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Aufgabe"
|
|
|
|
class Meta:
|
|
model = ExerciseBlock
|
|
|
|
|
|
class SelfEvaluationBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Selbsteinschätzung"
|
|
|
|
class Meta:
|
|
model = SelfEvaluationBlock
|
|
|
|
|
|
class DocumentBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Dokument"
|
|
|
|
class Meta:
|
|
model = DocumentBlock
|
|
|
|
|
|
class KnowledgeBlockFactory(wagtail_factories.StructBlockFactory):
|
|
description = "Beispiel Wissen"
|
|
|
|
class Meta:
|
|
model = KnowledgeBlock
|