Exemplo n.º 1
0
 def test_init_admin_disabled_or_missing(self):
     ns = NetworkSettings(files_dir + 'network_settings.yaml')
     # remove admin, apex section will re-add it
     ns['networks'].pop('admin', None)
     assert_raises(NetworkSettingsException, NetworkSettings, ns)
     # remove admin and apex
     ns.pop('apex', None)
     ns['networks'].pop('admin', None)
     assert_raises(NetworkSettingsException, NetworkSettings, ns)
Exemplo n.º 2
0
 def test_init_missing_dns_domain(self):
     ns = NetworkSettings(files_dir + 'network_settings.yaml')
     # remove storage
     ns.pop('dns-domain', None)
     assert_is_instance(NetworkSettings(ns), NetworkSettings)