Esempio n. 1
0
 def test_add_record(self, zps, zpm):
     bp = BindProvider()
     bp.reload_config = Mock()
     bp.add_record({'rr': 'A', 'alias': 'foo', 'addr': '127.0.0.1'})
     zps.assert_called_once()
     zpm.assert_called_once()
     bp.reload_config.assert_called_once()
 def test_add_record(self, zps, zpm):
     bp = BindProvider()
     bp.reload_config = Mock()
     bp.add_record({'rr': 'A', 'alias': 'foo', 'addr': '127.0.0.1'})
     zps.assert_called_once()
     zpm.assert_called_once()
     bp.reload_config.assert_called_once()
Esempio n. 3
0
 def test_remove_record(self, zpm):
     bp = BindProvider()
     bp.reload_config = Mock()
     zpm.zone.remove = Mock()
     zpm.save = Mock()
     bp.remove_record({'rr': 'A', 'alias': 'ns'})
     zpm.save.assert_called_once()
     bp.reload_config.assert_called_once()
 def test_remove_record(self, zpm):
     bp = BindProvider()
     bp.reload_config = Mock()
     zpm.zone.remove = Mock()
     zpm.save = Mock()
     bp.remove_record({'rr': 'A', 'alias': 'ns'})
     zpm.save.assert_called_once()
     bp.reload_config.assert_called_once()
Esempio n. 5
0
 def test_config_changed(self, osem, zpsm):
     osem.return_value = False
     bp = BindProvider()
     bp.reload_config = Mock()
     bp.first_setup = Mock()
     bp.config_changed()
     bp.first_setup.assert_called_once()
     zpsm.assert_called_once()
     bp.reload_config.assert_called_once()
 def test_config_changed(self, osem, zpsm):
     osem.return_value = False
     bp = BindProvider()
     bp.reload_config = Mock()
     bp.first_setup = Mock()
     bp.config_changed()
     bp.first_setup.assert_called_once()
     zpsm.assert_called_once()
     bp.reload_config.assert_called_once()