Skip to content

Commit

Permalink
Fix: Test Case
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsureshkumar committed Apr 11, 2023
1 parent adec7f5 commit ec3e60e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions graphene_mongo/tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ async def resolve_reporter(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_custom_kwargs(fixtures):
class Query(graphene.ObjectType):
editors = graphene.List(types.EditorType, first=graphene.Int())
Expand Down Expand Up @@ -148,6 +149,7 @@ async def resolve_editors(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_self_reference(fixtures):
class Query(graphene.ObjectType):
all_players = graphene.List(types.PlayerType)
Expand Down Expand Up @@ -194,6 +196,7 @@ async def resolve_all_players(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_query_with_embedded_document(fixtures):
class Query(graphene.ObjectType):
professor_vector = graphene.Field(
Expand Down Expand Up @@ -223,6 +226,7 @@ async def resolve_professor_vector(self, info, id):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_query_child(fixtures):
class Query(graphene.ObjectType):
children = graphene.List(types.ChildType)
Expand Down Expand Up @@ -259,6 +263,7 @@ async def resolve_children(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_query_other_childs(fixtures):
class Query(graphene.ObjectType):
children = graphene.List(types.AnotherChildType)
Expand Down Expand Up @@ -295,6 +300,7 @@ async def resolve_children(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_query_all_childs(fixtures):
class Query(graphene.ObjectType):
children = graphene.List(types.ChildUnionType)
Expand Down Expand Up @@ -348,6 +354,7 @@ async def resolve_children(self, *args, **kwargs):
assert result.data == expected


@pytest.mark.asyncio
async def test_should_query_cell_tower(fixtures):
class Query(graphene.ObjectType):
cell_towers = graphene.List(types.CellTowerType)
Expand Down

0 comments on commit ec3e60e

Please sign in to comment.