(self, other)
| 289 | return "%s object" % self.__class__.__name__ |
| 290 | |
| 291 | def __eq__(self, other): |
| 292 | if ( |
| 293 | isinstance(other, self.__class__) |
| 294 | and hasattr(other, "id") |
| 295 | and other.id is not None |
| 296 | ): |
| 297 | return self.id == other.id |
| 298 | if isinstance(other, DBRef): |
| 299 | return ( |
| 300 | self._get_collection_name() == other.collection and self.id == other.id |
| 301 | ) |
| 302 | if self.id is None: |
| 303 | return self is other |
| 304 | return False |
| 305 | |
| 306 | def __ne__(self, other): |
| 307 | return not self.__eq__(other) |
no test coverage detected