Added caching to travis tests

This commit is contained in:
Syrus Akbary 2015-10-28 01:30:39 -07:00
parent e82c680fd1
commit ee3279e12b
3 changed files with 13 additions and 3 deletions

View File

@ -6,9 +6,10 @@ python:
- 3.4
- 3.5
- pypy
cache: pip
install:
- pip install pytest pytest-cov coveralls flake8 six blinker pytest-django
- pip install -e .[django]
- pip install --cache-dir $HOME/.cache/pip pytest pytest-cov coveralls flake8 six blinker pytest-django
- pip install --cache-dir $HOME/.cache/pip -e .[django]
- python setup.py develop
script:
- py.test --cov=graphene

10
graphene/utils/misc.py Normal file
View File

@ -0,0 +1,10 @@
from collections import OrderedDict
from graphql.core.type import GraphQLEnumType, GraphQLEnumValue
def enum_to_graphql_enum(enumeration):
return GraphQLEnumType(
name=enumeration.__name__,
values=OrderedDict([(it.name, GraphQLEnumValue(it.value)) for it in enumeration]),
description=enumeration.__doc__
)

View File

@ -1,7 +1,6 @@
SECRET_KEY = 1
INSTALLED_APPS = [
'graphene.contrib.django',
'examples.starwars_django',
'tests.contrib_django',
]