def setup(self): m = multiscanner.load_module('test_1', [multiscanner.MODULEDIR]) global_module_interface = multiscanner._GlobalModuleInterface() self.result = multiscanner._run_module('test_1', m, self.filelist, self.threadDict, global_module_interface) global_module_interface._cleanup()
def setup(self): self.m = multiscanner.load_module('test_2', [multiscanner.MODULEDIR]) self.threadDict['test_2'] = mock.Mock() self.threadDict['test_1'] = mock.Mock() self.threadDict['test_1'].ret = ([('a', 'a'), ('C:\\c', 'c')], {}) self.global_module_interface = multiscanner._GlobalModuleInterface()
def test_fail_loadModule(): """Ensure _loadModule works""" m = multiscanner.load_module('notathing', [os.path.join(CWD, "modules")]) assert m is None
def test_loadModule(): """Ensure _loadModule works""" m = multiscanner.load_module('test_1', [os.path.join(CWD, "modules")]) assert isinstance(m, types.ModuleType)
def setup(self): self.m = multiscanner.load_module('test_2', [multiscanner.MODULEDIR]) self.threadDict['test_2'] = mock.Mock() self.threadDict['test_1'] = mock.Mock() self.threadDict['test_1'].ret = ([('a','a'), ('C:\\c','c')], {}) self.global_module_interface = multiscanner._GlobalModuleInterface()
def setup(self): m = multiscanner.load_module('test_1', [multiscanner.MODULEDIR]) global_module_interface = multiscanner._GlobalModuleInterface() self.result = multiscanner._runModule('test_1', m, self.filelist, self.threadDict, global_module_interface) global_module_interface._cleanup()