diff --git a/mockfirestore/document.py b/mockfirestore/document.py index 24aa433..8778d7c 100644 --- a/mockfirestore/document.py +++ b/mockfirestore/document.py @@ -39,7 +39,7 @@ def read_time(self) -> Timestamp: timestamp = Timestamp.from_now() return timestamp - def get(self, field_path: str) -> Any: + def get(self, field_path: str, transaction=None) -> Any: if not self.exists: return None else: @@ -63,7 +63,11 @@ def __init__(self, data: Store, path: List[str], def id(self): return self._path[-1] - def get(self) -> DocumentSnapshot: + @property + def path(self): + return "/".join(self._path) + + def get(self, transaction=None) -> DocumentSnapshot: return DocumentSnapshot(self, get_by_path(self._data, self._path)) def delete(self): diff --git a/setup.py b/setup.py index f55cb88..669ca7a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="mock-firestore", - version="0.11.0", + version="0.11.3", author="Matt Dowds", description="In-memory implementation of Google Cloud Firestore for use in tests", long_description=long_description, @@ -21,4 +21,4 @@ 'Programming Language :: Python :: 3.10', "License :: OSI Approved :: MIT License", ], -) \ No newline at end of file +)