def test_set_ssh_port(self): """ Test if it enable SSH on a user defined port """ with patch.object( ilo, "global_settings", return_value={"Global Settings": { "SSH_PORT": { "VALUE": 22 } }}, ): self.assertTrue(ilo.set_ssh_port()) with patch.object( ilo, "global_settings", return_value={"Global Settings": { "SSH_PORT": { "VALUE": 20 } }}, ): with patch.object(ilo, "__execute_cmd", return_value={"Configure SSH Port": {}}): self.assertDictEqual(ilo.set_ssh_port(), {"Configure SSH Port": {}})
def test_set_ssh_port(self): ''' Test if it enable SSH on a user defined port ''' with patch.object( ilo, 'global_settings', return_value={'Global Settings': { 'SSH_PORT': { 'VALUE': 22 } }}): self.assertTrue(ilo.set_ssh_port()) with patch.object( ilo, 'global_settings', return_value={'Global Settings': { 'SSH_PORT': { 'VALUE': 20 } }}): with patch.object(ilo, '__execute_cmd', return_value={'Configure SSH Port': {}}): self.assertDictEqual(ilo.set_ssh_port(), {'Configure SSH Port': {}})
def test_set_ssh_port(self): ''' Test if it enable SSH on a user defined port ''' with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'SSH_PORT': {'VALUE': 22}}}): self.assertTrue(ilo.set_ssh_port()) with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'SSH_PORT': {'VALUE': 20}}}): with patch.object(ilo, '__execute_cmd', return_value={'Configure SSH Port': {}}): self.assertDictEqual(ilo.set_ssh_port(), {'Configure SSH Port': {}})