Skip to content
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

Add tests to validation behaviour of graphql-transport-ws subscriptions #3671

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3445d24
Add tests for blocking operation validation
kristjanvalur Mar 8, 2023
2be1bf4
Move validation into the task
kristjanvalur Apr 8, 2023
02772ee
Add some error/validation test cases
kristjanvalur Apr 9, 2023
7687c4e
Use duck typing to detect an ExecutionResult/GraphQLExeucitonResult
kristjanvalur Apr 9, 2023
6198007
add an async context getter for tests which is easily patchable.
kristjanvalur Apr 9, 2023
9ef3bf0
Add tests to ensure context_getter does not block connection
kristjanvalur Apr 9, 2023
7cf537e
Move context getter and root getter into worker task
kristjanvalur Apr 9, 2023
e41ffe9
Catch top level errors
kristjanvalur Jun 8, 2023
c3d6447
Add a test for the task error handler
kristjanvalur Jun 9, 2023
a9589e4
add release.md
kristjanvalur May 9, 2023
ca229a7
Remove dead code, fix coverage
kristjanvalur Jun 30, 2023
1a62b1a
remove special case for AsyncMock
kristjanvalur Aug 3, 2023
76716d0
Add "no cover" to schema code which is designed to not be hit.
kristjanvalur Nov 8, 2023
1ad929b
Update tests for litestar
kristjanvalur Mar 31, 2024
8ced4e4
Litestar integration must be excluded from long test, like Starlite.
kristjanvalur Mar 31, 2024
35a8e68
coverage
kristjanvalur Mar 31, 2024
4084639
Mark some test schema methods as no cover since they are not always used
kristjanvalur Apr 2, 2024
d17a4d4
Mypy support for SubscriptionExecutionResult
kristjanvalur Sep 7, 2024
a1d0695
ruff
kristjanvalur Sep 7, 2024
e43aca8
Remove unused method for coverage
kristjanvalur Sep 8, 2024
3d97deb
Merge branch 'main' into kristjan/validate-in-task
kristjanvalur Oct 13, 2024
1be5a06
revert the handler to original state
kristjanvalur Oct 13, 2024
c074e09
Remove tests for long contexts
kristjanvalur Oct 13, 2024
373400f
Revert "add an async context getter for tests which is easily patchab…
kristjanvalur Oct 13, 2024
c4d0b05
cleanup
kristjanvalur Oct 13, 2024
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
Prev Previous commit
Next Next commit
Update tests for litestar
kristjanvalur committed Sep 7, 2024
commit 1ad929b2fcadbe4a05b446c3f38d923d2942fbd4
4 changes: 2 additions & 2 deletions tests/http/clients/litestar.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
from strawberry.types import ExecutionResult
from tests.views.schema import Query, schema

from ..context import get_context
from ..context import get_context_async as get_context
from .base import (
JSON,
DebuggableGraphQLTransportWSMixin,
@@ -35,7 +35,7 @@ def custom_context_dependency() -> str:


async def litestar_get_context(request: Request = None):
return get_context({"request": request})
return await get_context({"request": request})


async def get_root_value(request: Request = None):