diff --git a/graphene_django/forms/tests/test_mutation.py b/graphene_django/forms/tests/test_mutation.py index a455a0a8c..543136ea3 100644 --- a/graphene_django/forms/tests/test_mutation.py +++ b/graphene_django/forms/tests/test_mutation.py @@ -78,11 +78,11 @@ class PetMutation(DjangoModelFormMutation): class Meta: form_class = ExtraPetForm - result = PetMutation.mutate_and_get_payload(None, None) - assert {f.field for f in result.errors} == {"name", "age", "test_field"} - graphene_settings.CAMELCASE_ERRORS = True result = PetMutation.mutate_and_get_payload(None, None) assert {f.field for f in result.errors} == {"name", "age", "testField"} + graphene_settings.CAMELCASE_ERRORS = False + result = PetMutation.mutate_and_get_payload(None, None) + assert {f.field for f in result.errors} == {"name", "age", "test_field"} class MockQuery(ObjectType): @@ -316,4 +316,4 @@ class Meta: assert result.errors[0].messages == ["This field is required."] assert result.errors[1].messages == ["This field is required."] assert "age" in fields_w_error - assert "name" in fields_w_error + assert "name" in fields_w_error \ No newline at end of file diff --git a/graphene_django/settings.py b/graphene_django/settings.py index 07cbba1ec..f4f4db3b5 100644 --- a/graphene_django/settings.py +++ b/graphene_django/settings.py @@ -34,7 +34,7 @@ "RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST": False, # Max items returned in ConnectionFields / FilterConnectionFields "RELAY_CONNECTION_MAX_LIMIT": 100, - "CAMELCASE_ERRORS": False, + "CAMELCASE_ERRORS": True, # Set to True to enable v3 naming convention for choice field Enum's "DJANGO_CHOICE_FIELD_ENUM_V3_NAMING": False, "DJANGO_CHOICE_FIELD_ENUM_CUSTOM_NAME": None,