Skip to content

Commit

Permalink
v1 29 failed
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Jun 27, 2020
1 parent e32866d commit 71ef9ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion google/cloud/firestore_v1/client.py
Expand Up @@ -567,7 +567,7 @@ def _parse_batch_get(get_doc_response, reference_map, client):
ValueError: If the response has a ``result`` field (a oneof) other
than ``found`` or ``missing``.
"""
result_type = get_doc_response.WhichOneof("result")
result_type = get_doc_response._pb.WhichOneof("result")
if result_type == "found":
reference = _get_reference(get_doc_response.found.name, reference_map)
data = _helpers.decode_dict(get_doc_response.found.fields, client)
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/firestore_v1beta1/client.py
Expand Up @@ -488,7 +488,7 @@ def _parse_batch_get(get_doc_response, reference_map, client):
ValueError: If the response has a ``result`` field (a oneof) other
than ``found`` or ``missing``.
"""
result_type = get_doc_response.WhichOneof("result")
result_type = get_doc_response._pb.WhichOneof("result")
if result_type == "found":
reference = _get_reference(get_doc_response.found.name, reference_map)
data = _helpers.decode_dict(get_doc_response.found.fields, client)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/v1/test_client.py
Expand Up @@ -212,14 +212,14 @@ def test_collection_factory_nested(self):
self.assertIs(collection2._client, client)
self.assertIsInstance(collection2, CollectionReference)

def test_collection_group(self):
def test_collection_group(self):
client = self._make_default_one()
query = client.collection_group("collectionId").where("foo", "==", u"bar")

assert query._all_descendants
assert query._field_filters[0].field.field_path == "foo"
assert query._field_filters[0].value.string_value == u"bar"
assert query._field_filters[0].op == query._field_filters[0].EQUAL
assert query._field_filters[0].op == query._field_filters[0].Operator.EQUAL
assert query._parent.id == "collectionId"

def test_collection_group_no_slashes(self):
Expand Down

0 comments on commit 71ef9ed

Please sign in to comment.