Rev gateway tests

This commit is contained in:
Cyber MacGeddon 2025-07-14 12:53:34 +01:00
parent 57bea86e18
commit 7f0dfdf520
2 changed files with 8 additions and 5 deletions

View file

@ -313,8 +313,8 @@ class TestConfigReceiver:
}
# Mock the flow methods using patch.object to avoid coroutine creation during assignment
start_flow_mock = AsyncMock()
stop_flow_mock = AsyncMock()
start_flow_mock = Mock()
stop_flow_mock = Mock()
with patch.object(config_receiver, 'start_flow', start_flow_mock), \
patch.object(config_receiver, 'stop_flow', stop_flow_mock):

View file

@ -226,8 +226,9 @@ class TestRunFunction:
mock_args.metrics_port = 8000
mock_parse_args.return_value = mock_args
# Mock the Api instance
# Mock the Api instance and its run method
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict
@ -258,8 +259,9 @@ class TestRunFunction:
mock_args.metrics = False
mock_parse_args.return_value = mock_args
# Mock the Api instance
# Mock the Api instance and its run method
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict
@ -289,8 +291,9 @@ class TestRunFunction:
mock_args.metrics = False
mock_parse_args.return_value = mock_args
# Mock the Api instance
# Mock the Api instance and its run method
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict with all expected arguments