mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-21 00:22:56 +00:00
Test start / stop. And check if the mocked function is really called
This commit is contained in:
@ -39,7 +39,8 @@ class _asyncio_patch:
|
||||
def __enter__(self):
|
||||
"""Used when enter in the with block"""
|
||||
self._patcher = patch(self.function, return_value=self._fake_anwser())
|
||||
self._patcher.start()
|
||||
mock_class = self._patcher.start()
|
||||
return mock_class
|
||||
|
||||
def __exit__(self, *exc_info):
|
||||
"""Used when leaving the with block"""
|
||||
|
Reference in New Issue
Block a user