mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 08:42:32 +03:00
applied formatting & linting
This commit is contained in:
parent
20e505c3ab
commit
ca83173af0
|
@ -97,25 +97,24 @@ def test_exclude_fields():
|
||||||
assert "cool_name" in MyMutation.Input._meta.fields
|
assert "cool_name" in MyMutation.Input._meta.fields
|
||||||
assert "created" not in MyMutation.Input._meta.fields
|
assert "created" not in MyMutation.Input._meta.fields
|
||||||
|
|
||||||
|
|
||||||
def test_model_serializer_required_fields():
|
def test_model_serializer_required_fields():
|
||||||
class MyMutation(SerializerMutation):
|
class MyMutation(SerializerMutation):
|
||||||
class Meta:
|
class Meta:
|
||||||
serializer_class = MyModelSerializer
|
serializer_class = MyModelSerializer
|
||||||
|
|
||||||
assert "cool_name" in MyMutation.Input._meta.fields
|
assert "cool_name" in MyMutation.Input._meta.fields
|
||||||
assert MyMutation.Input._meta.fields['cool_name'].type == NonNull(String)
|
assert MyMutation.Input._meta.fields["cool_name"].type == NonNull(String)
|
||||||
|
|
||||||
|
|
||||||
'''
|
|
||||||
The same test as previous, but with 'cool_name' in `optional_fields`
|
|
||||||
'''
|
|
||||||
def test_model_serializer_optional_fields():
|
def test_model_serializer_optional_fields():
|
||||||
class MyMutation(SerializerMutation):
|
class MyMutation(SerializerMutation):
|
||||||
class Meta:
|
class Meta:
|
||||||
serializer_class = MyModelSerializer
|
serializer_class = MyModelSerializer
|
||||||
optional_fields = ('cool_name')
|
optional_fields = "cool_name"
|
||||||
|
|
||||||
assert "cool_name" in MyMutation.Input._meta.fields
|
assert "cool_name" in MyMutation.Input._meta.fields
|
||||||
assert MyMutation.Input._meta.fields['cool_name'].type == String
|
assert MyMutation.Input._meta.fields["cool_name"].type == String
|
||||||
|
|
||||||
|
|
||||||
def test_write_only_field():
|
def test_write_only_field():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user