mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 05:05:14 +02:00
Test start / stop. And check if the mocked function is really called
This commit is contained in:
1 parent
87a089457f
commit
ce9fd3cb25
4 files changed
+15
-10
No files matched your search
+2
-1
@@ -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