/ tests / unit / common / utils / test_initializer.py
test_initializer.py
 1  """
 2  Unit tests for src/solace_agent_mesh/common/utils/initializer.py
 3  
 4  Tests the initialize function with basic functionality only.
 5  """
 6  
 7  import pytest
 8  
 9  from src.solace_agent_mesh.common.utils.initializer import initialize
10  
11  
12  class TestInitializeBasicFunctionality:
13      """Test basic initialization functionality"""
14  
15      def test_initialize_runs_without_error(self):
16          """Test that initialize runs without raising exceptions"""
17          # Should not raise any exceptions
18          try:
19              initialize()
20              assert True  # If we get here, no exception was raised
21          except Exception as e:
22              pytest.fail(f"initialize() raised an exception: {e}")
23  
24      def test_initialize_multiple_calls(self):
25          """Test that initialize can be called multiple times without error"""
26          # Should not raise any exceptions even when called multiple times
27          try:
28              initialize()
29              initialize()
30              initialize()
31              assert True  # If we get here, no exception was raised
32          except Exception as e:
33              pytest.fail(f"Multiple initialize() calls raised an exception: {e}")