Skip to content

Commit f6211fd

Browse files
committed
fixed tests
1 parent a116df9 commit f6211fd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/api/apps/shared_models/tests/test_quiz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.test import TestCase
22
from django.utils import timezone
3-
from ..models.quiz_models import Question, Answer, Topic
3+
from ..models.quiz_models import Question, Answer, Subject, Topic
44

55
MC = Question.QuestionType.MULTICHOICE
66
NA = Question.QuestionType.NUMERIC
@@ -58,7 +58,8 @@ def setUp(self):
5858
q = Question.objects.create(
5959
text="This is a physics question", question_type=NA
6060
)
61-
t = Topic.objects.create(name="Unit 3 Physics")
61+
s = Subject.objects.create(name="Physics")
62+
t = Topic.objects.create(name="Unit 3 Physics", subject=s)
6263
q.topic_set.add(t)
6364

6465
def test(self):

0 commit comments

Comments
 (0)