def test_enable_dhcp(self): """ Test if it enable DHCP """ with patch.object( ilo, "network", return_value={ "Network Settings": { "DHCP_ENABLE": { "VALUE": "Y" } } }, ): self.assertTrue(ilo.enable_dhcp()) with patch.object( ilo, "network", return_value={ "Network Settings": { "DHCP_ENABLE": { "VALUE": "N" } } }, ): with patch.object(ilo, "__execute_cmd", return_value={"Enable DHCP": {}}): self.assertDictEqual(ilo.enable_dhcp(), {"Enable DHCP": {}})
def test_enable_dhcp(self): ''' Test if it enable DHCP ''' with patch.object(ilo, 'network', return_value={ 'Network Settings': { 'DHCP_ENABLE': { 'VALUE': 'Y' } } }): self.assertTrue(ilo.enable_dhcp()) with patch.object(ilo, 'network', return_value={ 'Network Settings': { 'DHCP_ENABLE': { 'VALUE': 'N' } } }): with patch.object(ilo, '__execute_cmd', return_value={'Enable DHCP': {}}): self.assertDictEqual(ilo.enable_dhcp(), {'Enable DHCP': {}})
def test_enable_dhcp(self): ''' Test if it enable DHCP ''' with patch.object(ilo, 'network', return_value={'Network Settings': {'DHCP_ENABLE': {'VALUE': 'Y'}}}): self.assertTrue(ilo.enable_dhcp()) with patch.object(ilo, 'network', return_value={'Network Settings': {'DHCP_ENABLE': {'VALUE': 'N'}}}): with patch.object(ilo, '__execute_cmd', return_value={'Enable DHCP': {}}): self.assertDictEqual(ilo.enable_dhcp(), {'Enable DHCP': {}})