Skip to content

Commit

Permalink
fix: remove redundant test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
meetbryce committed Jun 11, 2024
1 parent 23bfbb3 commit b01b8fc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/test_slack_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ def mock_os_environ():
yield


@pytest.fixture
def mock_socket_mode_handler():
with patch.object(SocketModeHandler, 'start', return_value=None) as mock:
yield mock


@pytest.fixture
def mock_uvicorn():
with patch('uvicorn.run', return_value=None) as mock:
Expand All @@ -46,9 +40,8 @@ def test_pulse(mock_app, mock_os_environ):
assert result == {"status": 200, "message": "ok"}


def test_main_loads_as_script(mock_app_advanced, mock_socket_mode_handler, mock_uvicorn, mock_os_environ, capfd):
def test_main_loads_as_script(mock_app_advanced, mock_uvicorn, mock_os_environ, capfd):
runpy.run_module('ossai.slack_server', run_name='__main__')
out, err = capfd.readouterr()
assert err == ''
assert mock_socket_mode_handler.called
assert mock_uvicorn.called

0 comments on commit b01b8fc

Please sign in to comment.