예제 #1
0
파일: _helpers.py 프로젝트: kx30/igorPython
 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))
예제 #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"]
예제 #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")
예제 #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"]
예제 #5
0
    def _call_fut(path):
        from google.cloud.firestore_v1 import field_path

        return field_path.parse_field_path(path)
예제 #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)
예제 #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))