def test_handle_kill_action_invalid_dict(mock_controller): action_handler = ActionHandler(mock_controller) kill_action = {"type": "KILL_ACTOR", "ip_address": "1234", "port": 30} with pytest.raises(ValidationError): action_handler.handle_kill_action(kill_action)
def test_handle_kill_action(mock_controller): action_handler = ActionHandler(mock_controller) kill_action = _get_mock_kill_action() action_handler.handle_kill_action(kill_action) assert mock_controller.kill_actor.call_count == 1