def test_set_https_port(self): """ Test if it configure the port HTTPS should listen on """ with patch.object( ilo, "global_settings", return_value={ "Global Settings": { "HTTP_PORT": { "VALUE": 443 } } }, ): self.assertTrue(ilo.set_https_port()) with patch.object( ilo, "global_settings", return_value={"Global Settings": { "HTTP_PORT": { "VALUE": 80 } }}, ): with patch.object(ilo, "__execute_cmd", return_value={"Set HTTPS Port": {}}): self.assertDictEqual(ilo.set_https_port(), {"Set HTTPS Port": {}})
def test_set_https_port(self): ''' Test if it configure the port HTTPS should listen on ''' with patch.object(ilo, 'global_settings', return_value={ 'Global Settings': { 'HTTP_PORT': { 'VALUE': 443 } } }): self.assertTrue(ilo.set_https_port()) with patch.object( ilo, 'global_settings', return_value={'Global Settings': { 'HTTP_PORT': { 'VALUE': 80 } }}): with patch.object(ilo, '__execute_cmd', return_value={'Set HTTPS Port': {}}): self.assertDictEqual(ilo.set_https_port(), {'Set HTTPS Port': {}})
def test_set_https_port(self): ''' Test if it configure the port HTTPS should listen on ''' with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'HTTP_PORT': {'VALUE': 443}}}): self.assertTrue(ilo.set_https_port()) with patch.object(ilo, 'global_settings', return_value={'Global Settings': {'HTTP_PORT': {'VALUE': 80}}}): with patch.object(ilo, '__execute_cmd', return_value={'Set HTTPS Port': {}}): self.assertDictEqual(ilo.set_https_port(), {'Set HTTPS Port': {}})