def test_first_setup(self, ugm, spcom):
     spcom.return_value = '10.0.0.1'
     bp = BindProvider()
     parser = MagicMock()
     bp.first_setup(parser)
     ugm.assert_called_once()
     parser.dict_to_zone.assert_called_with({'rr': 'A', 'alias': 'ns',
                                             'addr': '10.0.0.1',
                                             'ttl': 300})
Example #2
0
 def test_first_setup(self, ugm, spcom):
     spcom.return_value = '10.0.0.1'
     bp = BindProvider()
     parser = MagicMock()
     bp.first_setup(parser)
     ugm.assert_called_once()
     parser.dict_to_zone.assert_called_with({
         'rr': 'A',
         'alias': 'ns',
         'addr': '10.0.0.1',
         'ttl': 300
     })
Example #3
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()