6
6
from mock import patch
7
7
from dump .helper import create_template_dict , sort_lists
8
8
from dump .plugins .copp import Copp
9
+ from .mock_sonicv2connector import MockSonicV2Connector
9
10
10
11
module_tests_path = os .path .dirname (__file__ )
11
12
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" )
15
15
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" )
17
18
18
19
dedicated_dbs = {}
19
20
dedicated_dbs ['CONFIG_DB' ] = os .path .join (copp_files_path , "config_db.json" )
@@ -33,7 +34,7 @@ def verbosity_setup():
33
34
os .environ ["VERBOSE" ] = "0"
34
35
35
36
@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" ))
37
38
class TestCoppModule (unittest .TestCase ):
38
39
39
40
def test_usr_cfg_trap_and_copp_cfg_file_grp (self ):
0 commit comments