Ejemplo n.º 1
0
 def _construct_merge_paths(self, merge):
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))
Ejemplo n.º 2
0
def test_parse_field_path_w_escaped_backslash():
    from google.cloud.firestore_v1 import field_path

    assert field_path.parse_field_path("`a\\\\b`.c.d") == ["a\\b", "c", "d"]
Ejemplo n.º 3
0
def test_parse_field_path_w_first_name_escaped_wo_closing_backtick():
    from google.cloud.firestore_v1 import field_path

    with pytest.raises(ValueError):
        field_path.parse_field_path("`a\\`b.c.d")
Ejemplo n.º 4
0
def test_parse_field_path_wo_escaped_names():
    from google.cloud.firestore_v1 import field_path

    assert field_path.parse_field_path("a.b.c") == ["a", "b", "c"]
Ejemplo n.º 5
0
    def _call_fut(path):
        from google.cloud.firestore_v1 import field_path

        return field_path.parse_field_path(path)
Ejemplo n.º 6
0
 def _construct_merge_paths(self, merge) -> Generator[Any, Any, None]:
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))
    def _call_fut(path):
        from google.cloud.firestore_v1 import field_path

        return field_path.parse_field_path(path)
Ejemplo n.º 8
0
 def _construct_merge_paths(self, merge):
     for merge_field in merge:
         if isinstance(merge_field, FieldPath):
             yield merge_field
         else:
             yield FieldPath(*parse_field_path(merge_field))