Merge pull request #239 from jkimbo/fix-tests

Fix tests on travis
This commit is contained in:
Syrus Akbary 2016-08-06 11:51:41 -07:00 committed by GitHub
commit c1d93d6046
2 changed files with 9 additions and 6 deletions

View File

@ -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:
- |

View File

@ -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')