neutron-lib/releasenotes/notes/directory-fixture-083c5c5f365670d6.yaml
Armando Migliaccio 1c92b539ff Add fixture for plugin directory
This is needed to stop stubbing out _get_plugin_directory
from neutron unit tests, thus preserving testing isolation.

Change-Id: Ic94b264068955c67d71b86fe54825b9fba4533ac
2017-01-09 15:48:53 -08:00

18 lines
568 B
YAML

---
features:
- |
Introduced neutron_lib.fixture, and added fixture for plugin
directory ``PluginDirectoryFixture``. An example below:
.. code-block:: python
from neutron_lib.plugins import directory
from neutron_lib import fixture
def setup_test_directory_instance(self):
"""Give a private copy of the directory to each test."""
self._plugin_directory = directory._PluginDirectory()
self.useFixture(fixture.PluginDirectoryFixture(
plugin_directory=self._plugin_directory))