File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
graphene_django/rest_framework/tests Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -291,20 +291,19 @@ class Meta:
291
291
choice_type = {
292
292
"choice_type" : SomeCreateSerializerMutation .Input .choice_type .type .get ("ASDF" )
293
293
}
294
+ name = MyFakeModelWithChoiceField .ChoiceType .ASDF .name
294
295
result = SomeCreateSerializerMutation .mutate_and_get_payload (
295
296
None , mock_info (), ** choice_type
296
297
)
297
298
assert result .errors is None
298
- assert result .choice_type == MyFakeModelWithChoiceField . ChoiceType . ASDF . name
299
+ assert result .choice_type == name
299
300
kwargs = SomeCreateSerializerMutation .get_serializer_kwargs (
300
301
None , mock_info (), ** choice_type
301
302
)
302
- assert (
303
- kwargs ["data" ]["choice_type" ] == MyFakeModelWithChoiceField .ChoiceType .ASDF .name
304
- )
303
+ assert kwargs ["data" ]["choice_type" ] == name
305
304
assert 1 == MyFakeModelWithChoiceField .objects .count ()
306
305
item = MyFakeModelWithChoiceField .objects .first ()
307
- assert item .choice_type == MyFakeModelWithChoiceField . ChoiceType . ASDF . name
306
+ assert item .choice_type == name
308
307
309
308
310
309
def test_mutate_and_get_payload_error ():
You can’t perform that action at this time.
0 commit comments