mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 19:32:33 +03:00
Fixed unit tests
This commit is contained in:
parent
9fbbaa5e3b
commit
cffa3b3b2d
|
@ -57,16 +57,20 @@ def test_connection_meta_assignment():
|
||||||
class BaseConnection(object):
|
class BaseConnection(object):
|
||||||
extra = String()
|
extra = String()
|
||||||
|
|
||||||
class MyObjectConnection(BaseConnection, Connection):
|
class InheritedConnection(Connection):
|
||||||
class Meta:
|
class Meta:
|
||||||
node = MyObject
|
abstract = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __init_subclass_with_meta__(cls, node=None, name=None, **options):
|
def __init_subclass_with_meta__(cls, node=None, name=None, **options):
|
||||||
return super(MyObjectConnection, cls).__init_subclass_with_meta__(
|
return super(InheritedConnection, cls).__init_subclass_with_meta__(
|
||||||
_meta=meta, node=node, name=name, **options
|
_meta=meta, node=node, name=name, **options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class MyObjectConnection(BaseConnection, InheritedConnection):
|
||||||
|
class Meta:
|
||||||
|
node = MyObject
|
||||||
|
|
||||||
assert id(MyObjectConnection._meta) == id(meta)
|
assert id(MyObjectConnection._meta) == id(meta)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user