mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-23 01:57:08 +03:00
13 lines
447 B
Python
13 lines
447 B
Python
from ..utils import get_model_fields
|
|
from .models import Film, Reporter
|
|
|
|
|
|
def test_get_model_fields_no_duplication():
|
|
reporter_fields = get_model_fields(Reporter)
|
|
reporter_name_set = set([field[0] for field in reporter_fields])
|
|
assert len(reporter_fields) == len(reporter_name_set)
|
|
|
|
film_fields = get_model_fields(Film)
|
|
film_name_set = set([field[0] for field in film_fields])
|
|
assert len(film_fields) == len(film_name_set)
|