43 lines
1.5 KiB
Python
43 lines
1.5 KiB
Python
from factory import Dict
|
|
from factory.django import DjangoModelFactory
|
|
from factory.fuzzy import FuzzyChoice, FuzzyInteger
|
|
|
|
from vbv_lernwelt.feedback.models import FeedbackResponse
|
|
|
|
|
|
class FeedbackFactory(DjangoModelFactory):
|
|
data = Dict(
|
|
{
|
|
"satisfaction": FuzzyInteger(2, 4),
|
|
"goal_attainment": FuzzyInteger(3, 4),
|
|
"proficiency": FuzzyChoice([20, 40, 60, 80]),
|
|
"received_materials": FuzzyChoice([True, False]),
|
|
"materials_rating": FuzzyInteger(2, 4),
|
|
"instructor_competence": FuzzyInteger(3, 4),
|
|
"instructor_respect": FuzzyInteger(3, 4),
|
|
"instructor_open_feedback": FuzzyChoice(
|
|
[
|
|
"Alles gut, manchmal etwas langfädig",
|
|
"Super, bin begeistert",
|
|
"Ok, enspricht den Erwartungen",
|
|
]
|
|
),
|
|
"would_recommend": FuzzyChoice([True, False]),
|
|
"course_positive_feedback": FuzzyChoice(
|
|
[
|
|
"Die Präsentation war super",
|
|
"Das Beispiel mit der Katze fand ich sehr gut veranschaulicht!",
|
|
]
|
|
),
|
|
"course_negative_feedback": FuzzyChoice(
|
|
[
|
|
"Es wäre praktisch, Zugang zu einer FAQ zu haben.",
|
|
"Es wäre schön, mehr Videos hinzuzufügen.",
|
|
]
|
|
),
|
|
}
|
|
)
|
|
|
|
class Meta:
|
|
model = FeedbackResponse
|