commit 1d70823c6a84371c78294c5f43f11944e01bff38 Author: Renat Akhmerov Date: Mon Oct 5 16:06:07 2020 +0700 Address a TODO comment in the legacy action provider test * Added a test action generator to the test that checks the config option "load_action_generators". Change-Id: I3ec465d5d9505a93850494d767668c021ef63847 diff --git a/mistral/tests/unit/actions/test_legacy_action_provider.py b/mistral/tests/unit/actions/test_legacy_action_provider.py index 99605a7..cf462a2 100644 --- a/mistral/tests/unit/actions/test_legacy_action_provider.py +++ b/mistral/tests/unit/actions/test_legacy_action_provider.py @@ -120,6 +120,11 @@ class LegacyActionProviderTest(base.BaseTest): ) self.assertEqual('output, delay=0', action_desc.params_spec) + @mock.patch.object( + legacy.LegacyActionProvider, + '_get_action_generators', + mock.MagicMock(return_value=[TestActionGenerator]) + ) def test_only_action_plugins(self): self.override_config( 'load_action_generators', @@ -129,9 +134,6 @@ class LegacyActionProviderTest(base.BaseTest): provider = legacy.LegacyActionProvider() - # TODO(rakhmerov): Implement loading actions from generators - # and test with a generator. - action_descs = provider.find_all() prefix = 'mistral.actions.std_actions'