Skip to content

Commit e11fd2a

Browse files
Michael Kryukovmichaelkryukov
Michael Kryukov
authored andcommitted
feat: added close to supported methods for cursors
1 parent c50c6e1 commit e11fd2a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mongomock_motor/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def wrapper(self, *args, **kwargs):
9191
'where',
9292
],
9393
)
94+
@with_async_methods(
95+
'__cursor',
96+
[
97+
'close',
98+
],
99+
)
94100
class AsyncCursor:
95101
def __init__(self, cursor):
96102
self.__cursor = cursor
@@ -178,6 +184,12 @@ async def to_list(self, *args, **kwargs):
178184
'update_one',
179185
],
180186
)
187+
@with_async_methods(
188+
'__cursor',
189+
[
190+
'close',
191+
],
192+
)
181193
class AsyncMongoMockCollection:
182194
def __init__(self, database, collection):
183195
self.database = database

0 commit comments

Comments
 (0)