def test_disable_ssh(self): """ Test if it disable the SSH daemon """ with patch.object( ilo, "global_settings", return_value={ "Global Settings": { "SSH_STATUS": { "VALUE": "N" } } }, ): self.assertTrue(ilo.disable_ssh()) with patch.object( ilo, "global_settings", return_value={ "Global Settings": { "SSH_STATUS": { "VALUE": "Y" } } }, ): with patch.object(ilo, "__execute_cmd", return_value={"Disable SSH": {}}): self.assertDictEqual(ilo.disable_ssh(), {"Disable SSH": {}})
def test_disable_ssh(self): ''' Test if it disable the SSH daemon ''' with patch.object(ilo, 'global_settings', return_value={ 'Global Settings': { 'SSH_STATUS': { 'VALUE': 'N' } } }): self.assertTrue(ilo.disable_ssh()) with patch.object(ilo, 'global_settings', return_value={ 'Global Settings': { 'SSH_STATUS': { 'VALUE': 'Y' } } }): with patch.object(ilo, '__execute_cmd', return_value={'Disable SSH': {}}): self.assertDictEqual(ilo.disable_ssh(), {'Disable SSH': {}})
def test_disable_ssh(self): ''' Test if it disable the SSH daemon ''' with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'SSH_STATUS': {'VALUE': 'N'}}}): self.assertTrue(ilo.disable_ssh()) with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'SSH_STATUS': {'VALUE': 'Y'}}}): with patch.object(ilo, '__execute_cmd', return_value={'Disable SSH': {}}): self.assertDictEqual(ilo.disable_ssh(), {'Disable SSH': {}})