Removed unused unit test - test_mongo_setup.py. This is mongo setup tests db dir creation, which is already tested in test_utils.py

This commit is contained in:
VakarisZ 2021-05-27 16:02:01 +03:00
parent f2c8de9eb6
commit dbade5951c
1 changed files with 0 additions and 24 deletions

View File

@ -1,24 +0,0 @@
import os
from monkey_island.cc.setup.mongo_setup import _create_db_dir
def test_create_db_dir(monkeypatch, tmpdir):
test_dir_name = "test_dir"
monkeypatch.setattr("monkey_island.cc.setup.mongo_setup.DB_DIR_NAME", test_dir_name)
expected_path = os.path.join(tmpdir, test_dir_name)
db_path = _create_db_dir(tmpdir)
assert os.path.isdir(expected_path)
assert db_path == expected_path
def test_create_db_dir_already_created(monkeypatch, tmpdir):
test_dir_name = "test_dir"
monkeypatch.setattr("monkey_island.cc.setup.mongo_setup.DB_DIR_NAME", test_dir_name)
expected_path = os.path.join(tmpdir, test_dir_name)
os.mkdir(expected_path)
db_path = _create_db_dir(tmpdir)
assert os.path.isdir(expected_path)
assert db_path == expected_path