Beispiel #1
0
 def _test_ip_config_fails(self, **setup):
     with self.assertRaises(ne.ConfigNetworkError) as cne:
         validator.validate_static_ipv4_config(setup)
     self.assertEqual(cne.exception.errCode, ne.ERR_BAD_ADDR)
Beispiel #2
0
 def test_config_with_gateway(self):
     STATIC_CONFIG = dict(ipaddr='10.10.10.10',
                          netmask='255.255.255.0',
                          gateway='10.10.10.1')
     validator.validate_static_ipv4_config(STATIC_CONFIG)
Beispiel #3
0
 def _test_ip_config_fails(self, **setup):
     with self.assertRaises(ne.ConfigNetworkError) as cne:
         validator.validate_static_ipv4_config(setup)
     self.assertEqual(cne.exception.errCode, ne.ERR_BAD_ADDR)
 def _test_ip_config_fails(self, **setup):
     with pytest.raises(ne.ConfigNetworkError) as cne:
         validator.validate_static_ipv4_config(setup)
     assert cne.value.errCode == ne.ERR_BAD_ADDR
Beispiel #5
0
 def test_config_with_gateway(self):
     STATIC_CONFIG = dict(ipaddr='10.10.10.10',
                          netmask='255.255.255.0',
                          gateway='10.10.10.1')
     validator.validate_static_ipv4_config(STATIC_CONFIG)