def test_default_cwd(self, p): set_cwd(tempfile.mkdtemp()) cuckoo_create() with chdir(cwd()): decide_cwd(".") cuckoo_init(logging.INFO, self.ctx) p.assert_called_once_with("cuckoo community")
def test_has_signatures(self, p): set_cwd(tempfile.mkdtemp()) sys.modules.pop("signatures", None) sys.modules.pop("signatures.android", None) sys.modules.pop("signatures.cross", None) sys.modules.pop("signatures.darwin", None) sys.modules.pop("signatures.extractor", None) sys.modules.pop("signatures.network", None) sys.modules.pop("signatures.windows", None) cuckoo_create() shutil.copy( "tests/files/enumplugins/sig1.py", cwd("signatures", "windows", "foobar.py") ) cuckoo.signatures = [] cuckoo_init(logging.INFO, self.ctx) p.assert_not_called()
def test_hardcoded_cwd_with_quote(self, p): set_cwd(tempfile.mkdtemp("foo ' bar")) cuckoo_create() decide_cwd(cwd()) cuckoo_init(logging.INFO, self.ctx) p.assert_called_once_with('cuckoo --cwd "%s" community' % cwd())
def test_hardcoded_cwd(self, p): set_cwd(tempfile.mkdtemp()) cuckoo_create() decide_cwd(cwd()) cuckoo_init(logging.INFO, self.ctx) p.assert_called_once_with("cuckoo --cwd %s community" % cwd())
def test_hardcoded_cwd_with_quote(self, p): set_cwd(tempfile.mkdtemp("foo ' bar")) cuckoo_create() decide_cwd(cwd()) cuckoo_init(logging.INFO, self.ctx) p.assert_called_once_with('cuckoo --cwd "%s" community' % cwd())
def test_hardcoded_cwd(self, p): set_cwd(tempfile.mkdtemp()) cuckoo_create() decide_cwd(cwd()) cuckoo_init(logging.INFO, self.ctx) p.assert_called_once_with("cuckoo --cwd %s community" % cwd())