diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/assessments/tests/factories.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ctrack/assessments/tests/factories.py b/ctrack/assessments/tests/factories.py index c8e26ec..21b2286 100644 --- a/ctrack/assessments/tests/factories.py +++ b/ctrack/assessments/tests/factories.py @@ -1,7 +1,17 @@ -# Factories for populating the CAF assessment data - import factory +from factory import Faker + +from ctrack.assessments.models import AchievementLevel + + +class AchievementLevelFactory(factory.DjangoModelFactory): + descriptor = Faker("text", max_nb_chars=30, ext_word_list=None) + colour_description = Faker("text", max_nb_chars=30, ext_word_list=None) + colour_hex = Faker("text", max_nb_chars=30, ext_word_list=None) + + class Meta: + model = AchievementLevel -# class CAFSelfAssessmentFactory(factory.DjangoModelFactory): -# caf = factory.SubFactory("ctrack.caf.tests.factories.CAF") +class IGPFactory(factory.DjangoModelFactory): + achievement_level = factory.SubFactory(AchievementLevelFactory) |