Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcollins committed Feb 17, 2025
1 parent 9970637 commit 9a41a5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions opentelemetry-sdk/tests/test_configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,9 @@ def test_logging_init_exporter_without_handler_setup(self):
def test_logging_init_disable_default(self, logging_mock, tracing_mock):
_initialize_components(auto_instrumentation_version="auto-version")
self.assertEqual(tracing_mock.call_count, 1)
logging_mock.assert_called_once_with(mock.ANY, mock.ANY, False)
logging_mock.assert_called_once_with(
mock.ANY, mock.ANY, False, "%(levelname)s:%(name)s:%(message)s"
)

@patch.dict(
environ,
Expand All @@ -712,7 +714,9 @@ def test_logging_init_disable_default(self, logging_mock, tracing_mock):
def test_logging_init_enable_env(self, logging_mock, tracing_mock):
with self.assertLogs(level=WARNING):
_initialize_components(auto_instrumentation_version="auto-version")
logging_mock.assert_called_once_with(mock.ANY, mock.ANY, True)
logging_mock.assert_called_once_with(
mock.ANY, mock.ANY, True, "%(levelname)s:%(name)s:%(message)s"
)
self.assertEqual(tracing_mock.call_count, 1)

@patch.dict(
Expand Down Expand Up @@ -837,6 +841,7 @@ def test_initialize_components_kwargs(
"TEST_LOG_EXPORTERS_DICT",
"TEST_RESOURCE",
True,
"%(levelname)s:%(name)s:%(message)s",
)


Expand Down

0 comments on commit 9a41a5e

Please sign in to comment.