diff --git a/mockfirestore/document.py b/mockfirestore/document.py index 24aa433..c4e3c2d 100644 --- a/mockfirestore/document.py +++ b/mockfirestore/document.py @@ -59,6 +59,15 @@ def __init__(self, data: Store, path: List[str], self._path = path self.parent = parent + def __hash__(self): + return hash(tuple(self._path)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self._path == other._path + @property def id(self): return self._path[-1]