summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_policy/tests/test_generator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_policy/tests/test_generator.py b/oslo_policy/tests/test_generator.py
index af6398f..1f74aa3 100644
--- a/oslo_policy/tests/test_generator.py
+++ b/oslo_policy/tests/test_generator.py
@@ -492,8 +492,8 @@ class GeneratorRaiseErrorTestCase(testtools.TestCase):
raise FakeException()
fake_ep = FakeEP()
- fake_eps = mock.Mock(return_value=[fake_ep])
- with mock.patch('pkg_resources.iter_entry_points', fake_eps):
+ with mock.patch('stevedore.named.NamedExtensionManager',
+ side_effect=FakeException()):
self.assertRaises(FakeException, generator._generate_sample,
fake_ep.name)