Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tearDown(self):
mock.patch.stopall()
def tearDown(self):
self.testbed.deactivate()
patch.stopall()
def setUp(self):
self.addCleanup(patch.stopall)
self.csv = patch.object(module, 'csv').start()
self.json = patch.object(module, 'json').start()
self.Stream = patch.object(module, 'Stream').start()
self.open = patch.object(module.io, 'open').start()
self.ensure_dir = patch.object(module.helpers, 'ensure_dir').start()
self.SchemaModel = patch.object(module, 'SchemaModel').start()
self.import_module = patch.object(module, 'import_module').start()
self.storage = self.import_module.return_value.Storage.return_value
self.backend_options = {}
def tearDown(self):
patch.stopall()
def _tearDownClass(cls):
mock.patch.stopall()
if cls._do_not_run_instances():
return
if cls._do_not_stop_instances():
cls.debug("Skipping instances stopping")
return
print("{}: stopping instances...".format(cls.SHORT_DESCR))
for instance in cls.INSTANCES:
cls.debug("Stopping instance '{}'...".format(instance.name))
instance.stop()
def tearDown(self):
self.testbed.deactivate()
patch.stopall()
def tearDown(self):
mock.patch.stopall()
def tearDown(self):
mock.patch.stopall()
shutil.rmtree(self.tempdir)
def tearDown(self):
mock.patch.stopall()
def tearDown(self):
if not self.ip_cache_mocked:
self.ip_cache.save()
mock.patch.stopall()