@@ -149,7 +149,7 @@ def test_create_question_group_incorrect_dict(self, m):
149
149
150
150
# create_question()
151
151
def test_create_question (self , m ):
152
- register_uris ({"quiz" : ["create_question" ]}, m )
152
+ register_uris ({"quiz" : ["create_question" , "edit" ]}, m )
153
153
154
154
question_dict = {
155
155
"question_name" : "Pick Correct Answer" ,
@@ -165,6 +165,25 @@ def test_create_question(self, m):
165
165
self .assertTrue (hasattr (question , "question_name" ))
166
166
self .assertEqual (question .question_name , question_dict ["question_name" ])
167
167
168
+
169
+ def test_create_question_autosaves (self , m ):
170
+ register_uris ({"quiz" : ["create_question" , "edit" ]}, m )
171
+
172
+ question_dict = {
173
+ "question_name" : "Pick Correct Answer" ,
174
+ "question_type" : "multiple_choice_question" ,
175
+ "question_text" : "What is the right answer?" ,
176
+ "points_possible" : 10 ,
177
+ "correct_comments" : "That's correct!" ,
178
+ "incorrect_comments" : "That's wrong!" ,
179
+ }
180
+
181
+ question = self .quiz .create_question (question = question_dict )
182
+
183
+ self .assertIsInstance (question , QuizQuestion )
184
+ self .assertEqual (question .question_name , question_dict ["question_name" ])
185
+
186
+
168
187
# get_question()
169
188
def test_get_question (self , m ):
170
189
register_uris ({"quiz" : ["get_question" ]}, m )
0 commit comments