Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydvoss committed Oct 4, 2023
1 parent 191842d commit bdc0c4a
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TestLoad(TestCase):
"os.environ", {OTEL_PYTHON_CONFIGURATOR: "custom_configurator2"}
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_configurators(self, iter_mock):
# Add multiple entry points but only specify the 2nd in the environment variable.
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_load_configurators(self, iter_mock):
"os.environ", {OTEL_PYTHON_CONFIGURATOR: "custom_configurator2"}
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_configurators_no_ep(
self,
Expand All @@ -73,7 +73,7 @@ def test_load_configurators_no_ep(
"os.environ", {OTEL_PYTHON_CONFIGURATOR: "custom_configurator2"}
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_configurators_error(self, iter_mock):
# Add multiple entry points but only specify the 2nd in the environment variable.
Expand All @@ -100,7 +100,7 @@ def test_load_configurators_error(self, iter_mock):
"opentelemetry.instrumentation.auto_instrumentation._load.isinstance"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_distro(self, iter_mock, isinstance_mock):
# Add multiple entry points but only specify the 2nd in the environment variable.
Expand Down Expand Up @@ -133,7 +133,7 @@ def test_load_distro(self, iter_mock, isinstance_mock):
"opentelemetry.instrumentation.auto_instrumentation._load.DefaultDistro"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_distro_not_distro(
self, iter_mock, default_distro_mock, isinstance_mock
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_load_distro_not_distro(
"opentelemetry.instrumentation.auto_instrumentation._load.DefaultDistro"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_distro_no_ep(self, iter_mock, default_distro_mock):
iter_mock.return_value = ()
Expand All @@ -180,7 +180,7 @@ def test_load_distro_no_ep(self, iter_mock, default_distro_mock):
"opentelemetry.instrumentation.auto_instrumentation._load.isinstance"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_distro_error(self, iter_mock, isinstance_mock):
ep_mock1 = Mock()
Expand Down Expand Up @@ -210,7 +210,7 @@ def test_load_distro_error(self, iter_mock, isinstance_mock):
"opentelemetry.instrumentation.auto_instrumentation._load.get_dist_dependency_conflicts"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_instrumentors(self, iter_mock, dep_mock):
# Mock opentelemetry_pre_instrument entry points
Expand Down Expand Up @@ -283,7 +283,7 @@ def test_load_instrumentors(self, iter_mock, dep_mock):
"opentelemetry.instrumentation.auto_instrumentation._load.get_dist_dependency_conflicts"
)
@patch(
"opentelemetry.instrumentation.auto_instrumentation._load.iter_entry_points"
"opentelemetry.instrumentation.auto_instrumentation._load.entry_points"
)
def test_load_instrumentors_dep_conflict(self, iter_mock, dep_mock):
ep_mock1 = Mock()
Expand Down

0 comments on commit bdc0c4a

Please sign in to comment.