From dbade5951caaf35902ba22487b0be4c69aef3da6 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Thu, 27 May 2021 16:02:01 +0300 Subject: [PATCH] Removed unused unit test - test_mongo_setup.py. This is mongo setup tests db dir creation, which is already tested in test_utils.py --- .../cc/setup/test_mongo_setup.py | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 monkey/tests/unit_tests/monkey_island/cc/setup/test_mongo_setup.py diff --git a/monkey/tests/unit_tests/monkey_island/cc/setup/test_mongo_setup.py b/monkey/tests/unit_tests/monkey_island/cc/setup/test_mongo_setup.py deleted file mode 100644 index 388e1a6c0..000000000 --- a/monkey/tests/unit_tests/monkey_island/cc/setup/test_mongo_setup.py +++ /dev/null @@ -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