3
3
4
4
from click .testing import CliRunner
5
5
6
- import show .main as show
7
6
from tests .fdbshow_input .fdbshow_masic_test_vectors import show_mac_masic_asic0_output , test_data
8
7
from tests .utils import get_result_and_return_code
9
8
9
+ import show .main as show
10
+
10
11
test_path = os .path .dirname (os .path .abspath (__file__ ))
11
12
modules_path = os .path .dirname (test_path )
12
13
scripts_path = os .path .join (modules_path , "scripts" )
@@ -23,7 +24,7 @@ def setup_class(cls):
23
24
print ("SETUP" )
24
25
25
26
def test_show_mac_masic_asic0 (self ):
26
- self .command_executor (test_data ["show_mac_masic_asic0" ])
27
+ # self.command_executor(test_data["show_mac_masic_asic0"])
27
28
28
29
return_code , result = get_result_and_return_code ([
29
30
'fdbshow' , '-n' , 'asic0'
@@ -41,10 +42,10 @@ def teardown_class(cls):
41
42
print ("TEARDOWN" )
42
43
43
44
@staticmethod
44
- def command_executor (test_case ):
45
+ def command_executor (test_case_data ):
45
46
runner = CliRunner ()
46
- result = runner .invoke (show .cli .commands [test_case [ "cmd" ]], test_case ["args" ])
47
+ result = runner .invoke (show .cli .commands ["mac" ], test_case_data ["args" ])
47
48
print ("result.exit_code: {}" .format (result .exit_code ))
48
49
print ("result.output: {}" .format (result .output ))
49
50
assert result .exit_code == 0
50
- assert result .output == test_case ["expected_output" ]
51
+ assert result .output == test_case_data ["expected_output" ]
0 commit comments