示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 def setUp(self):
     super(PluginDirectoryTestCase, self).setUp()
     self.plugin_directory = directory._PluginDirectory()
示例#4
0
 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))
示例#5
0
 def __init__(self, plugin_directory=None):
     super(PluginDirectoryFixture, self).__init__()
     self.plugin_directory = (plugin_directory
                              or directory._PluginDirectory())
示例#6
0
 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()