Skip to content

Commit 47b214f

Browse files
committed
Moved mock files to a diff dir
Signed-off-by: Vivek Reddy Karri <[email protected]>
1 parent c707944 commit 47b214f

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

tests/dump_tests/module_tests/copp_test.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
from mock import patch
77
from dump.helper import create_template_dict, sort_lists
88
from dump.plugins.copp import Copp
9+
from .mock_sonicv2connector import MockSonicV2Connector
910

1011
module_tests_path = os.path.dirname(__file__)
1112
dump_tests_path = os.path.join(module_tests_path, "../")
12-
copp_files_path = os.path.join(dump_tests_path,"files","copp")
13-
sys.path.append(dump_tests_path)
14-
sys.path.append(module_tests_path)
13+
tests_path = os.path.join(dump_tests_path, "../")
14+
dump_test_input = os.path.join(tests_path,"dump_input")
1515

16-
from module_tests.mock_sonicv2connector import MockSonicV2Connector
16+
# Location for dedicated db's used for UT
17+
copp_files_path = os.path.join(dump_test_input,"copp")
1718

1819
dedicated_dbs = {}
1920
dedicated_dbs['CONFIG_DB'] = os.path.join(copp_files_path, "config_db.json")
@@ -33,7 +34,7 @@ def verbosity_setup():
3334
os.environ["VERBOSE"] = "0"
3435

3536
@patch("dump.match_infra.SonicV2Connector", mock_connector)
36-
@patch("dump.plugins.copp.Copp.CONFIG_FILE", os.path.join(dump_tests_path, "files/copp_cfg.json"))
37+
@patch("dump.plugins.copp.Copp.CONFIG_FILE", os.path.join(dump_test_input, "copp_cfg.json"))
3738
class TestCoppModule(unittest.TestCase):
3839

3940
def test_usr_cfg_trap_and_copp_cfg_file_grp(self):

0 commit comments

Comments
 (0)