Skip to content

Commit c8cfcee

Browse files
committed
added tests
1 parent f22f11e commit c8cfcee

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/unit/v1/test_async_query.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,3 +826,18 @@ async def test_asynccollectiongroup_get_partitions_w_offset():
826826
query = _make_async_collection_group(parent).offset(10)
827827
with pytest.raises(ValueError):
828828
[i async for i in query.get_partitions(2)]
829+
830+
def test_asyncquery_collection_pipeline_type():
831+
from google.cloud.firestore_v1.async_pipeline import AsyncPipeline
832+
client = make_async_client()
833+
parent = client.collection("test")
834+
query = parent._query()
835+
ppl = query.pipeline()
836+
assert isinstance(ppl, AsyncPipeline)
837+
838+
def test_asyncquery_collectiongroup_pipeline_type():
839+
from google.cloud.firestore_v1.async_pipeline import AsyncPipeline
840+
client = make_async_client()
841+
query = client.collection_group("test")
842+
ppl = query.pipeline()
843+
assert isinstance(ppl, AsyncPipeline)

tests/unit/v1/test_query.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,3 +949,18 @@ def test_collection_group_get_partitions_w_offset(database):
949949
query = _make_collection_group(parent).offset(10)
950950
with pytest.raises(ValueError):
951951
list(query.get_partitions(2))
952+
953+
def test_asyncquery_collection_pipeline_type():
954+
from google.cloud.firestore_v1.pipeline import Pipeline
955+
client = make_client()
956+
parent = client.collection("test")
957+
query = parent._query()
958+
ppl = query.pipeline()
959+
assert isinstance(ppl, Pipeline)
960+
961+
def test_asyncquery_collectiongroup_pipeline_type():
962+
from google.cloud.firestore_v1.pipeline import Pipeline
963+
client = make_client()
964+
query = client.collection_group("test")
965+
ppl = query.pipeline()
966+
assert isinstance(ppl, Pipeline)

0 commit comments

Comments
 (0)