Skip to content

Commit

Permalink
remove mock_test_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Aug 23, 2024
1 parent 9d11297 commit 4c47d1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/base_daemon_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ async def _on_start_cb(self):
raise Exception("Test")

@mock.patch("builtins.open", new_callable=mock.mock_open)
@mock.patch("jeedomdaemon.aio_connector.Publisher.test_callback", new_callable=mock.AsyncMock)
def test_base_daemon_creation(self, mock_open_method, mock_test_callback):
def test_base_daemon_creation(self, mock_open_method):
"""
Tests if it can create a basic daemon
"""
with pytest.raises(SystemExit) as pytest_wrapped_e:
# with mock.patch('jeedomdaemon.aio_connector.Publisher.test_callback') as mock_test_callback:
self._test_daemon.run()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 0
mock_test_callback.assert_called_once()
# mock_test_callback.assert_called_once()

@mock.patch("builtins.open", new_callable=mock.mock_open)
def test_base_daemon_initialization(self, mock_open_method):
Expand Down

0 comments on commit 4c47d1f

Please sign in to comment.