Skip to content

Commit 6b59db2

Browse files
committed
fixed tests
1 parent 76e1c03 commit 6b59db2

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

packages/google-cloud-firestore/tests/system/pipeline_e2e/search.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ tests:
1212
- args:
1313
- referenceValue: /books
1414
name: collection
15-
- args: []
16-
name: search
15+
- name: search
1716
options:
1817
limit:
1918
integerValue: '2'
@@ -41,8 +40,7 @@ tests:
4140
- args:
4241
- referenceValue: /books
4342
name: collection
44-
- args: []
45-
name: search
43+
- name: search
4644
options:
4745
limit:
4846
integerValue: '5'
@@ -83,8 +81,7 @@ tests:
8381
- args:
8482
- referenceValue: /books
8583
name: collection
86-
- args: []
87-
name: search
84+
- name: search
8885
options:
8986
query:
9087
functionValue:

packages/google-cloud-firestore/tests/unit/v1/test_pipeline_stages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,12 @@ def test_search_query_enhancement_enum(self):
841841
assert pb_opts["query_enhancement"].string_value == "required"
842842

843843

844+
def test_search_string_field_coercion(self):
845+
options = stages.SearchOptions(query="tech", select=["title"])
846+
assert len(options.select) == 1
847+
assert isinstance(options.select[0], Field)
848+
assert options.select[0].path == "title"
849+
844850
class TestSelect:
845851
def _make_one(self, *args, **kwargs):
846852
return stages.Select(*args, **kwargs)

0 commit comments

Comments
 (0)