File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def setUp(self) -> None:
20
20
self .MockVirtualBus = patcher_virtual_bus .start ()
21
21
self .addCleanup (patcher_virtual_bus .stop )
22
22
self .mock_virtual_bus = self .MockVirtualBus .return_value
23
- self .mock_virtual_bus .shutdown = Mock ()
23
+ self .mock_virtual_bus .__enter__ = Mock (return_value = self . mock_virtual_bus )
24
24
25
25
# Patch time sleep object
26
26
patcher_sleep = mock .patch ("can.io.player.time.sleep" , spec = True )
@@ -35,6 +35,7 @@ def setUp(self) -> None:
35
35
36
36
def assert_successfull_cleanup (self ):
37
37
self .MockVirtualBus .assert_called ()
38
+ self .assertEqual (2 , len (self .mock_virtual_bus .__exit__ .mock_calls ))
38
39
39
40
def test_bridge_no_config (self ):
40
41
self .MockSleep .side_effect = KeyboardInterrupt
You can’t perform that action at this time.
0 commit comments