mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
Rev gateway tests
This commit is contained in:
parent
57bea86e18
commit
7f0dfdf520
2 changed files with 8 additions and 5 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue