mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-17 03:50:44 +03:00
Cleaned tests
This commit is contained in:
parent
bebdf5cf9b
commit
d8ca3c089a
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
from django.db import models
|
|
||||||
from py.test import raises
|
from py.test import raises
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
import graphene
|
import graphene
|
||||||
from graphene.contrib.django.converter import convert_django_field
|
from graphene.contrib.django.converter import convert_django_field
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
|
from graphql.core.type import GraphQLInterfaceType, GraphQLObjectType
|
||||||
|
|
||||||
from graphene import Schema
|
from graphene import Schema
|
||||||
from graphene.contrib.django.types import DjangoInterface, DjangoNode
|
from graphene.contrib.django.types import DjangoInterface, DjangoNode
|
||||||
from graphene.core.fields import Field
|
from graphene.core.fields import Field
|
||||||
from graphene.core.types.scalars import Int
|
from graphene.core.types.scalars import Int
|
||||||
from graphene.relay.fields import GlobalIDField
|
from graphene.relay.fields import GlobalIDField
|
||||||
from graphql.core.type import GraphQLInterfaceType, GraphQLObjectType
|
|
||||||
from tests.utils import assert_equal_lists
|
from tests.utils import assert_equal_lists
|
||||||
|
|
||||||
from .models import Article, Reporter
|
from .models import Article, Reporter
|
||||||
|
@ -77,12 +76,6 @@ def test_object_type():
|
||||||
object_type.get_fields().keys(),
|
object_type.get_fields().keys(),
|
||||||
['headline', 'id', 'reporter', 'pubDate']
|
['headline', 'id', 'reporter', 'pubDate']
|
||||||
)
|
)
|
||||||
# assert object_type.get_fields() == {
|
|
||||||
# 'headline': fields_map['headline'].internal_field(schema),
|
|
||||||
# 'id': fields_map['id'].internal_field(schema),
|
|
||||||
# 'reporter': fields_map['reporter'].internal_field(schema),
|
|
||||||
# 'pubDate': fields_map['pub_date'].internal_field(schema),
|
|
||||||
# }
|
|
||||||
assert schema.T(DjangoNode) in object_type.get_interfaces()
|
assert schema.T(DjangoNode) in object_type.get_interfaces()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ def test_field_no_contributed_raises_error():
|
||||||
|
|
||||||
|
|
||||||
def test_node_should_have_same_connection_always():
|
def test_node_should_have_same_connection_always():
|
||||||
object()
|
|
||||||
connection1 = relay.Connection.for_node(OtherNode)
|
connection1 = relay.Connection.for_node(OtherNode)
|
||||||
connection2 = relay.Connection.for_node(OtherNode)
|
connection2 = relay.Connection.for_node(OtherNode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user