From 2ef89886d3f86fd1197d26d6b719d9a2bc86825c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 21 Feb 2024 21:40:35 -0600 Subject: [PATCH] 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 --- selfdrive/athena/tests/test_athenad_ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/athena/tests/test_athenad_ping.py b/selfdrive/athena/tests/test_athenad_ping.py index 5231b0475f..49bd5f1142 100755 --- a/selfdrive/athena/tests/test_athenad_ping.py +++ b/selfdrive/athena/tests/test_athenad_ping.py @@ -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()