31 lines
920 B
Python
31 lines
920 B
Python
import factory
|
|
import wagtail_factories
|
|
|
|
from vbv_lernwelt.learnpath.models_competences import Competence, FullfillmentCriteria, CompetencePage
|
|
from vbv_lernwelt.learnpath.tests.learningpath_factories import LearningPathFactory
|
|
|
|
|
|
class CompetencePageFactory(wagtail_factories.PageFactory):
|
|
# learning_path = factory.SubFactory(LearningPathFactory)
|
|
|
|
class Meta:
|
|
model = CompetencePage
|
|
|
|
|
|
class CompetenceFactory(factory.django.DjangoModelFactory):
|
|
category_short = 'A'
|
|
name = "Weiterempfehung für neukunden generieren"
|
|
competence_page = factory.SubFactory(CompetencePageFactory)
|
|
|
|
class Meta:
|
|
model = Competence
|
|
|
|
|
|
class FullfilmentCriteriaFactory(factory.django.DjangoModelFactory):
|
|
name = 'Bestehende Kunden so zu beraten, dass sie von diesen weiterempfohlen werden'
|
|
competence = factory.SubFactory(CompetenceFactory)
|
|
|
|
class Meta:
|
|
model = FullfillmentCriteria
|
|
|