agent: Refactor add_subdirs_to_dir in test_dir_utils.py

This commit is contained in:
Mike Salvatore 2021-06-22 14:07:31 -04:00
parent b643cd1edd
commit 30f88ca319
1 changed files with 2 additions and 5 deletions

View File

@ -5,14 +5,11 @@ from infection_monkey.utils.dir_utils import (
)
FILES = ["file.jpg.zip", "file.xyz", "1.tar", "2.tgz"]
SUBDIR_1 = "subdir1"
SUBDIR_2 = "subdir2"
SUBDIRS = ["subdir1", "subdir2"]
def add_subdirs_to_dir(parent_dir):
subdir1 = parent_dir / SUBDIR_1
subdir2 = parent_dir / SUBDIR_2
subdirs = [subdir1, subdir2]
subdirs = [parent_dir / s for s in SUBDIRS]
for subdir in subdirs:
subdir.mkdir()