Rev gateway tests

This commit is contained in:
Cyber MacGeddon 2025-07-14 12:59:14 +01:00
parent 7f0dfdf520
commit 198c4303d7
3 changed files with 15 additions and 9 deletions

View file

@ -226,9 +226,10 @@ class TestRunFunction:
mock_args.metrics_port = 8000
mock_parse_args.return_value = mock_args
# Mock the Api instance and its run method
# Mock the Api instance and its methods to avoid any async behavior
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api_instance.app_factory = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict
@ -259,9 +260,10 @@ class TestRunFunction:
mock_args.metrics = False
mock_parse_args.return_value = mock_args
# Mock the Api instance and its run method
# Mock the Api instance and its methods to avoid any async behavior
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api_instance.app_factory = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict
@ -291,9 +293,10 @@ class TestRunFunction:
mock_args.metrics = False
mock_parse_args.return_value = mock_args
# Mock the Api instance and its run method
# Mock the Api instance and its methods to avoid any async behavior
mock_api_instance = Mock()
mock_api_instance.run = Mock()
mock_api_instance.app_factory = Mock()
mock_api.return_value = mock_api_instance
# Mock vars() to return a dict with all expected arguments