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
This commit is contained in:
Renat Akhmerov 2020-10-05 16:06:07 +07:00
parent 175e5fd587
commit 1d70823c6a

View File

@ -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'