Ejemplo n.º 1
0
 def test_multiple_folders(self):
     """Tests multiple folders creation."""
     utils.create_folders(self.tmp_dir, ["foo", "bar"])
     assert os.path.exists(os.path.join(self.tmp_dir, "foo"))
     assert os.path.exists(os.path.join(self.tmp_dir, "bar"))
     os.rmdir(os.path.join(self.tmp_dir, "foo"))
     os.rmdir(os.path.join(self.tmp_dir, "bar"))
Ejemplo n.º 2
0
 def test_multiple_folders(self):
     """Tests multiple folders creation."""
     utils.create_folders(self.tmp_dir, ["foo", "bar"])
     assert os.path.exists(os.path.join(self.tmp_dir, "foo"))
     assert os.path.exists(os.path.join(self.tmp_dir, "bar"))
     os.rmdir(os.path.join(self.tmp_dir, "foo"))
     os.rmdir(os.path.join(self.tmp_dir, "bar"))
Ejemplo n.º 3
0
def create_structure():
    """Creates Cuckoo directories."""
    folders = ["log",
               "storage",
               os.path.join("storage", "analyses"),
               os.path.join("storage", "binaries")]

    try:
        create_folders(root=CUCKOO_ROOT,folders=folders)
    except CuckooOperationalError as e:
        raise CuckooStartupError(e)
Ejemplo n.º 4
0
 def test_single_folder(self):
     """Tests a single folder creation."""
     utils.create_folders(self.tmp_dir, ["foo"])
     assert os.path.exists(os.path.join(self.tmp_dir, "foo"))
     os.rmdir(os.path.join(self.tmp_dir, "foo"))
Ejemplo n.º 5
0
 def test_single_folder(self):
     """Tests a single folder creation."""
     utils.create_folders(self.tmp_dir, ["foo"])
     assert os.path.exists(os.path.join(self.tmp_dir, "foo"))
     os.rmdir(os.path.join(self.tmp_dir, "foo"))