def test_disable_dhcp(self): """ Test if it disable DHCP """ with patch.object( ilo, "network", return_value={ "Network Settings": { "DHCP_ENABLE": { "VALUE": "N" } } }, ): self.assertTrue(ilo.disable_dhcp()) with patch.object( ilo, "network", return_value={ "Network Settings": { "DHCP_ENABLE": { "VALUE": "Y" } } }, ): with patch.object(ilo, "__execute_cmd", return_value={"Disable DHCP": {}}): self.assertDictEqual(ilo.disable_dhcp(), {"Disable DHCP": {}})
def test_disable_dhcp(self): ''' Test if it disable DHCP ''' with patch.object(ilo, 'network', return_value={ 'Network Settings': { 'DHCP_ENABLE': { 'VALUE': 'N' } } }): self.assertTrue(ilo.disable_dhcp()) with patch.object(ilo, 'network', return_value={ 'Network Settings': { 'DHCP_ENABLE': { 'VALUE': 'Y' } } }): with patch.object(ilo, '__execute_cmd', return_value={'Disable DHCP': {}}): self.assertDictEqual(ilo.disable_dhcp(), {'Disable DHCP': {}})
def test_disable_dhcp(self): ''' Test if it disable DHCP ''' with patch.object(ilo, 'network', return_value={'Network Settings': {'DHCP_ENABLE': {'VALUE': 'N'}}}): self.assertTrue(ilo.disable_dhcp()) with patch.object(ilo, 'network', return_value={'Network Settings': {'DHCP_ENABLE': {'VALUE': 'Y'}}}): with patch.object(ilo, '__execute_cmd', return_value={'Disable DHCP': {}}): self.assertDictEqual(ilo.disable_dhcp(), {'Disable DHCP': {}})