def test_enable_dhcp(self):
        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': {}})

    # 'disable_dhcp' function tests: 1
Test if it enable DHCP
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/ilo_test.py/IloTestCase.test_enable_dhcp