vbv/server/vbv_lernwelt/learnpath/tests/learningpath_factories.py

63 lines
1.6 KiB
Python

import wagtail_factories
import factory
from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningUnit, LearningPackage
from vbv_lernwelt.learnpath.models_learning_unit_content import VideoBlock, WebBasedTrainingBlock
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(factory.django.DjangoModelFactory):
title = "Grundlagen"
class Meta:
model = LearningSequence
class LearningPackageFactory(factory.django.DjangoModelFactory):
title = "Whatever"
class Meta:
model = LearningPackage
class LearningUnitFactory(wagtail_factories.PageFactory):
title = "Herzlich Willkommen"
class Meta:
model = LearningUnit
class VideoBlockFactory(wagtail_factories.StructBlockFactory):
title = "Ausbildung ist Pflicht"
url = "https://www.vbv.ch/fileadmin/vbv/Videos/Statements_Externe/Janos_M/Testimonial_Janos_Mischler_PositiveEffekte.mp4"
class Meta:
model = VideoBlock
class WebBasedTrainingBlockFactory(wagtail_factories.StructBlockFactory):
title = "Beispiel Rise Modul"
url = "https://docs.wagtail.org/en/stable/topics/streamfield.html"
class Meta:
model = WebBasedTrainingBlock