Skip to content

Commit 4ac3f5a

Browse files
Apply suggestions from code review
Co-authored-by: Hannah Stepanek <[email protected]>
1 parent 56dd594 commit 4ac3f5a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/datastore_firestore/test_async_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ async def _mock_partition_query():
179179
def exercise_async_collection_group(async_client, async_collection):
180180
async def _exercise_async_collection_group():
181181
async_collection_group = async_client.collection_group(async_collection.id)
182-
assert len(await async_collection_group.get()) >= 1
183-
assert len([d async for d in async_collection_group.stream()]) >= 1
182+
assert await async_collection_group.get()
183+
assert [d async for d in async_collection_group.stream()]
184184

185185
partitions = [p async for p in async_collection_group.get_partitions(1)]
186186
assert len(partitions) == 2

tests/datastore_firestore/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def sample_data(collection):
2929
@pytest.fixture()
3030
def exercise_client(client, sample_data):
3131
def _exercise_client():
32-
assert len([_ for _ in client.collections()]) >= 1
32+
assert [_ for _ in client.collections()]
3333
doc = [_ for _ in client.get_all([sample_data])][0]
3434
assert doc.to_dict()["x"] == 1
3535

tests/datastore_firestore/test_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def mock_partition_query(*args, **kwargs):
172172
def exercise_collection_group(client, collection, patch_partition_queries):
173173
def _exercise_collection_group():
174174
collection_group = client.collection_group(collection.id)
175-
assert len(collection_group.get())
176-
assert len([d for d in collection_group.stream()]) >= 1
175+
assert collection_group.get()
176+
assert [d for d in collection_group.stream()]
177177

178178
partitions = [p for p in collection_group.get_partitions(1)]
179179
assert len(partitions) == 2

0 commit comments

Comments
 (0)