Ejemplo n.º 1
0
 def test_delete_host(self, ddns_delete):
     '''
     Tests for delete the forward and reverse records for a host.
     '''
     ddns_delete.return_value = False
     with patch.object(dns.query, 'udp') as mock:
         mock.answer = [{'address': 'localhost'}]
         self.assertFalse(ddns.delete_host(zone='A', name='B'))
Ejemplo n.º 2
0
 def test_delete_host(self, ddns_delete):
     '''
     Tests for delete the forward and reverse records for a host.
     '''
     ddns_delete.return_value = False
     with patch.object(dns.query, 'udp') as mock:
         mock.answer = [{'address': 'localhost'}]
         self.assertFalse(ddns.delete_host(zone='A', name='B'))
Ejemplo n.º 3
0
 def test_delete_host(self):
     """
     Tests for delete the forward and reverse records for a host.
     """
     with patch("salt.modules.ddns.delete") as ddns_delete:
         ddns_delete.return_value = False
         with patch.object(dns.query, "udp") as mock:
             mock.answer = [{"address": "localhost"}]
             self.assertFalse(ddns.delete_host(zone="A", name="B"))