Skip to content

Update test to new Graphene API #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@ matrix:
env: TOX_ENV=pypy
- python: '2.7'
env: TOX_ENV=py27
- python: '3.3'
env: TOX_ENV=py33
- python: '3.4'
env: TOX_ENV=py34
- python: '3.5'
env: TOX_ENV=py35,import-order,flake8
env: TOX_ENV=py35
- python: '3.6'
env: TOX_ENV=py36,import-order,flake8
cache:
directories:
- $HOME/.cache/pip
6 changes: 3 additions & 3 deletions tests/schema.py
Original file line number Diff line number Diff line change
@@ -12,15 +12,15 @@ def resolve_raises(*_):
fields={
'thrower': GraphQLField(GraphQLNonNull(GraphQLString), resolver=resolve_raises),
'request': GraphQLField(GraphQLNonNull(GraphQLString),
resolver=lambda obj, args, context, info: context.args.get('q')),
resolver=lambda obj, info: info.context.args.get('q')),
'context': GraphQLField(GraphQLNonNull(GraphQLString),
resolver=lambda obj, args, context, info: context),
resolver=lambda obj, info: info.context),
'test': GraphQLField(
type=GraphQLString,
args={
'who': GraphQLArgument(GraphQLString)
},
resolver=lambda obj, args, context, info: 'Hello %s' % (args.get('who') or 'World')
resolver=lambda obj, info, who=None: 'Hello %s' % (who or 'World')
)
}
)
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = flake8,import-order,py35,py27,py33,py34,pypy
envlist = flake8,import-order,py36,py27,py34,py35,pypy
skipsdist = true

[testenv]
@@ -13,16 +13,16 @@ deps =
Flask>=0.10.0
pytest-cov
commands =
py{py,27,33,34,35}: py.test tests {posargs}
py{py,27,34,35,36}: py.test tests {posargs}

[testenv:flake8]
basepython=python3.5
basepython=python3.6
deps = flake8
commands =
flake8 flask_graphql

[testenv:import-order]
basepython=python3.5
basepython=python3.6
deps =
isort
graphql-core>=1.0