Skip to content

Commit

Permalink
Make more use of type inference in tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn committed Nov 17, 2024
1 parent b79a106 commit 072a299
Show file tree
Hide file tree
Showing 2 changed files with 274 additions and 343 deletions.
6 changes: 6 additions & 0 deletions tests/http/clients/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from strawberry.subscriptions.protocols.graphql_transport_ws.handlers import (
BaseGraphQLTransportWSHandler,
)
from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
Message as GraphQLTransportWSMessage,
)
from strawberry.subscriptions.protocols.graphql_ws.handlers import BaseGraphQLWSHandler
from strawberry.types import ExecutionResult

Expand Down Expand Up @@ -301,6 +304,9 @@ async def __aiter__(self) -> AsyncGenerator[Message, None]:
while not self.closed:
yield await self.receive()

async def send_message(self, message: GraphQLTransportWSMessage) -> None:
await self.send_json(message)


class DebuggableGraphQLTransportWSHandler(BaseGraphQLTransportWSHandler):
def on_init(self) -> None:
Expand Down
Loading

0 comments on commit 072a299

Please sign in to comment.