mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 16:52:25 +03:00
Default CAMELCASE_ERRORS to True
(cherry picked from commit 87daade8a54ef6297ce3263c8e2f4ad8722796f9)
This commit is contained in:
parent
5068ea05c3
commit
176e84d6d0
|
@ -51,12 +51,12 @@ def test_mutation_error_camelcased():
|
||||||
class Meta:
|
class Meta:
|
||||||
form_class = ExtraPetForm
|
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)
|
result = PetMutation.mutate_and_get_payload(None, None)
|
||||||
assert {f.field for f in result.errors} == {"name", "age", "testField"}
|
assert {f.field for f in result.errors} == {"name", "age", "testField"}
|
||||||
graphene_settings.CAMELCASE_ERRORS = False
|
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"}
|
||||||
|
graphene_settings.CAMELCASE_ERRORS = True
|
||||||
|
|
||||||
|
|
||||||
class ModelFormMutationTests(TestCase):
|
class ModelFormMutationTests(TestCase):
|
||||||
|
|
|
@ -35,7 +35,7 @@ DEFAULTS = {
|
||||||
"RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST": False,
|
"RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST": False,
|
||||||
# Max items returned in ConnectionFields / FilterConnectionFields
|
# Max items returned in ConnectionFields / FilterConnectionFields
|
||||||
"RELAY_CONNECTION_MAX_LIMIT": 100,
|
"RELAY_CONNECTION_MAX_LIMIT": 100,
|
||||||
"CAMELCASE_ERRORS": False,
|
"CAMELCASE_ERRORS": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user