File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,26 @@ def test_summary(self):
51
51
assert result .output == textwrap .dedent (expected_output )
52
52
53
53
54
+ class TestShowPlatformTemperature (object ):
55
+ """
56
+ Note: `show platform temperature` simply calls the `tempershow` utility and
57
+ passes a variety of options. Here we test that the utility is called
58
+ with the appropriate option(s). The functionality of the underlying
59
+ `tempershow` utility is expected to be tested by a separate suite of unit tests
60
+ """
61
+ def test_temperature (self ):
62
+ with mock .patch ('utilities_common.cli.run_command' ) as mock_run_command :
63
+ CliRunner ().invoke (show .cli .commands ['platform' ].commands ['temperature' ], [])
64
+ assert mock_run_command .call_count == 1
65
+ mock_run_command .assert_called_with (['tempershow' ], display_cmd = False )
66
+
67
+ def test_all_temperature_json (self ):
68
+ with mock .patch ('utilities_common.cli.run_command' ) as mock_run_command :
69
+ CliRunner ().invoke (show .cli .commands ['platform' ].commands ['temperature' ], ['--json' ])
70
+ assert mock_run_command .call_count == 1
71
+ mock_run_command .assert_called_with (['tempershow' , '-j' ], display_cmd = False )
72
+
73
+
54
74
class TestShowPlatformPsu (object ):
55
75
"""
56
76
Note: `show platform psustatus` simply calls the `psushow` utility and
You can’t perform that action at this time.
0 commit comments