aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/assessments/tests/factories.py
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-05-12 16:31:12 +0100
committerMR Lemon <matt@matthewlemon>2020-05-12 16:31:12 +0100
commit4201470c63c9719ca90710847985fc548ad9e6b9 (patch)
tree583ef880a7d7775a79f10511399165a8fca54670 /ctrack/assessments/tests/factories.py
parentdade2f791d101d1fd582782c50d76fcb95ba5596 (diff)
basic population of IGP data
Diffstat (limited to 'ctrack/assessments/tests/factories.py')
-rw-r--r--ctrack/assessments/tests/factories.py18
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)