Skip to content

Commit c8fb9a2

Browse files
authored
Merge pull request #6 from vikumarks/work-json-support-platform-temp
fixes for unit test
2 parents d87c4fe + 0f150fb commit c8fb9a2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/show_platform_test.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ def test_temperature(self):
6262
with mock.patch('utilities_common.cli.run_command') as mock_run_command:
6363
CliRunner().invoke(show.cli.commands['platform'].commands['temperature'], [])
6464
assert mock_run_command.call_count == 1
65-
mock_run_command.assert_called_with(['tempershow'], display_cmd=False)
65+
mock_run_command.assert_called_with(['tempershow'])
6666

67-
def test_all_temperature_json(self):
67+
def test_temperature_json(self):
6868
with mock.patch('utilities_common.cli.run_command') as mock_run_command:
6969
CliRunner().invoke(show.cli.commands['platform'].commands['temperature'], ['--json'])
7070
assert mock_run_command.call_count == 1
71-
mock_run_command.assert_called_with(['tempershow', '-j'], display_cmd=False)
71+
mock_run_command.assert_called_with(['tempershow', '-j'])
72+
73+
def test_temperature_short_json(self):
74+
with mock.patch('utilities_common.cli.run_command') as mock_run_command:
75+
CliRunner().invoke(show.cli.commands['platform'].commands['temperature'], ['-j'])
76+
assert mock_run_command.call_count == 1
77+
mock_run_command.assert_called_with(['tempershow', '-j'])
7278

7379

7480
class TestShowPlatformPsu(object):

0 commit comments

Comments
 (0)