Skip to content

Commit

Permalink
Fix strawberry tests (#1182)
Browse files Browse the repository at this point in the history
* Update imports.

* Update comments.

* Switch to strawberry package import.

* [Mega-Linter] Apply linters fixes

* Trigger tests.

* Trigger tests.

---------

Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>
  • Loading branch information
umaannamalai and umaannamalai authored Jul 24, 2024
1 parent 47581e9 commit a4ca19d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
12 changes: 8 additions & 4 deletions tests/framework_strawberry/_target_schema_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import List
from typing import List, Optional

import strawberry

try:
import strawberry.mutation
except ImportError:
import strawberry.types.mutation

import strawberry.mutation
import strawberry.type
from framework_strawberry._target_schema_sync import (
Item,
Library,
Expand All @@ -27,7 +32,6 @@
from strawberry import Schema, field
from strawberry.asgi import GraphQL
from strawberry.schema.config import StrawberryConfig
from strawberry.types.types import Optional
from testing_support.asgi_testing import AsgiTest

storage = []
Expand Down
12 changes: 8 additions & 4 deletions tests/framework_strawberry/_target_schema_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import List, Union
from typing import List, Optional, Union

import strawberry

try:
import strawberry.mutation
except ImportError:
import strawberry.types.mutation

import strawberry.mutation
import strawberry.type
from strawberry import Schema, field
from strawberry.asgi import GraphQL
from strawberry.schema.config import StrawberryConfig
from strawberry.types.types import Optional
from testing_support.asgi_testing import AsgiTest


Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ envlist =
python-framework_sanic-{py38,pypy310}-sanic{200904,210300,2109,2112,2203,2290},
python-framework_starlette-{py310,pypy310}-starlette{0014,0015,0019,0028},
python-framework_starlette-{py37,py38,py39,py310,py311,py312,pypy310}-starlettelatest,
python-framework_starlette-{py37,py38}-starlette{002001},
python-framework_starlette-{py37,py38}-starlette002001,
python-framework_strawberry-{py38,py39,py310,py311,py312}-strawberry02352,
python-framework_strawberry-{py37,py38,py39,py310,py311,py312}-strawberrylatest,
python-framework_tornado-{py38,py39,py310,py311,py312}-tornado{latest,master},
python-logger_logging-{py27,py37,py38,py39,py310,py311,py312,pypy27,pypy310},
Expand Down Expand Up @@ -361,6 +362,7 @@ deps =
framework_starlette-starlettelatest: starlette<0.35
framework_strawberry: starlette
framework_strawberry-strawberrylatest: strawberry-graphql
framework_strawberry-strawberry02352: strawberry-graphql<0.236.0
framework_tornado: pycurl
framework_tornado-tornadolatest: tornado
framework_tornado-tornadomaster: https://github.com/tornadoweb/tornado/archive/master.zip
Expand Down

0 comments on commit a4ca19d

Please sign in to comment.