Skip to content

Commit

Permalink
feat: added close to supported methods for cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kryukov authored and michaelkryukov committed Feb 26, 2024
1 parent c50c6e1 commit e11fd2a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mongomock_motor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def wrapper(self, *args, **kwargs):
'where',
],
)
@with_async_methods(
'__cursor',
[
'close',
],
)
class AsyncCursor:
def __init__(self, cursor):
self.__cursor = cursor
Expand Down Expand Up @@ -178,6 +184,12 @@ async def to_list(self, *args, **kwargs):
'update_one',
],
)
@with_async_methods(
'__cursor',
[
'close',
],
)
class AsyncMongoMockCollection:
def __init__(self, database, collection):
self.database = database
Expand Down

0 comments on commit e11fd2a

Please sign in to comment.