Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 23, 2017
1 parent 2408c16 commit d915b3f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
except ImportError:
from urllib.parse import urlencode

from aiohttp.helpers import FormData
try:
from aiohttp.helpers import FormData
except ImportError:
from aiohttp.formdata import FormData

from graphql.execution.executors.asyncio import AsyncioExecutor
from graphql.execution.executors.sync import SyncExecutor

Expand Down Expand Up @@ -204,7 +208,7 @@ def test_allows_sending_a_mutation_via_post(app):
def test_allows_post_with_url_encoding(app):
data = FormData()
data.add_field('query', '{test}')
_, response = app.client.post(uri=url_string(), data=data('utf-8'), headers={'content-type': data.content_type})
_, response = app.client.post(uri=url_string(), data=data(), headers={'content-type': 'application/x-www-form-urlencoded'})

assert response.status == 200
assert response_json(response) == {
Expand Down

0 comments on commit d915b3f

Please sign in to comment.