def setup_test_directory_instance(self): """Give a private copy of the directory to each test.""" # TODO(armax): switch to using a fixture to stop relying on stubbing # out _get_plugin_directory directly. self._plugin_directory = directory._PluginDirectory() mock.patch.object(directory, '_get_plugin_directory', return_value=self._plugin_directory).start()
def setUp(self): super(PluginDirectoryTestCase, self).setUp() self.plugin_directory = directory._PluginDirectory()
def setUp(self): super(TestServicePluginType, self).setUp() self._plugins = directory._PluginDirectory() self._plugins.add_plugin('stype', mock.Mock()) self.useFixture( fixture.PluginDirectoryFixture(plugin_directory=self._plugins))
def __init__(self, plugin_directory=None): super(PluginDirectoryFixture, self).__init__() self.plugin_directory = (plugin_directory or directory._PluginDirectory())
def setup_test_directory_instance(self): """Give a private copy of the directory to each test.""" self._plugin_directory = directory._PluginDirectory() mock.patch.object(directory, '_get_plugin_directory', return_value=self._plugin_directory).start()