diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py index ec3bc9367a..b526a02b21 100644 --- a/salt/modules/win_system.py +++ b/salt/modules/win_system.py @@ -454,7 +454,7 @@ def get_hostname(): ''' cmd = 'wmic computersystem get name' ret = __salt__['cmd.run'](cmd=cmd) - _,hostname = ret.split("\n") + _, hostname = ret.split("\n") return hostname diff --git a/tests/unit/states/win_system_test.py b/tests/unit/states/win_system_test.py index 276b097dda..ffed0c25b8 100644 --- a/tests/unit/states/win_system_test.py +++ b/tests/unit/states/win_system_test.py @@ -121,11 +121,11 @@ class WinSystemTestCase(TestCase): mock = MagicMock(return_value='salt') with patch.dict(win_system.__salt__, {"system.get_hostname": mock}): - ret.update({'comment': "Hostname is already set to 'salt'", + ret.update({'comment': "Hostname is already set to 'salt'", 'changes': {}, 'result': True}) - self.assertDictEqual(win_system.hostname('salt'), ret) + self.assertDictEqual(win_system.hostname('salt'), ret) if __name__ == '__main__':