Fix athenad reconnect test (#31538)

* debugging

* this also works

* so does this

* more similar to existing method

* clean up

* more

* more
old-commit-hash: 9dde72797462944c8139020d8088cd20030554df
This commit is contained in:
Shane Smiskol
2024-02-21 21:40:35 -06:00
committed by GitHub
parent b347145c9f
commit 2ef89886d3
+1 -1
View File
@@ -55,7 +55,7 @@ class TestAthenadPing(unittest.TestCase):
self.exit_event.set()
self.athenad.join()
@mock.patch('openpilot.selfdrive.athena.athenad.create_connection', autospec=True)
@mock.patch('openpilot.selfdrive.athena.athenad.create_connection', new_callable=lambda: mock.MagicMock(wraps=athenad.create_connection))
def assertTimeout(self, reconnect_time: float, mock_create_connection: mock.MagicMock) -> None:
self.athenad.start()