diff --git a/.travis.yml b/.travis.yml index 498caabb..0ec1e5cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,15 +12,15 @@ cache: install: - | if [ "$TEST_TYPE" = build ]; then - pip install --download-cache $HOME/.cache/pip/ pytest pytest-cov coveralls six pytest-django django-filter sqlalchemy_utils - pip install --download-cache $HOME/.cache/pip psycopg2 > /dev/null 2>&1 - pip install --download-cache $HOME/.cache/pip/ -e . - pip install --download-cache $HOME/.cache/pip/ -e .[django] - pip install --download-cache $HOME/.cache/pip/ -e .[sqlalchemy] + pip install pytest pytest-cov coveralls six pytest-django django-filter sqlalchemy_utils + pip install psycopg2 > /dev/null 2>&1 + pip install -e . + pip install -e .[django] + pip install -e .[sqlalchemy] pip install django==$DJANGO_VERSION python setup.py develop elif [ "$TEST_TYPE" = lint ]; then - pip install --download-cache $HOME/.cache/pip/ flake8 + pip install flake8 fi script: - | diff --git a/graphene/relay/tests/test_query.py b/graphene/relay/tests/test_query.py index 0c5f0fd2..1603709e 100644 --- a/graphene/relay/tests/test_query.py +++ b/graphene/relay/tests/test_query.py @@ -19,6 +19,7 @@ class MyNode(relay.Node): def get_node(cls, id, info): return MyNode(id=id, name='mo') + class MyObject(graphene.ObjectType): name = graphene.String() @@ -32,10 +33,12 @@ class SpecialNode(relay.Node): value = "!!!" if context.get('is_special') else "???" return SpecialNode(id=id, value=value) + def _create_my_node_edge(myNode): edge_type = relay.Edge.for_node(MyNode) return edge_type(node=myNode, cursor=str(myNode.id)) + class Query(graphene.ObjectType): my_node = relay.NodeField(MyNode) my_node_lazy = relay.NodeField('MyNode')