summaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'os_net_config/tests/test_objects.py')
-rw-r--r--os_net_config/tests/test_objects.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/os_net_config/tests/test_objects.py b/os_net_config/tests/test_objects.py
index c824ba8..8488370 100644
--- a/os_net_config/tests/test_objects.py
+++ b/os_net_config/tests/test_objects.py
@@ -119,6 +119,17 @@ class TestInterface(base.TestCase):
interface1 = objects.object_from_json(json.loads(data))
self.assertEqual("--foobar", interface1.dhclient_args)
+ def test_from_json_dns_servers(self):
+ data = """{
+"type": "interface",
+"name": "em1",
+"use_dhcp": true,
+"dns_servers": ["1.2.3.4"]
+}
+"""
+ interface1 = objects.object_from_json(json.loads(data))
+ self.assertEqual(["1.2.3.4"], interface1.dns_servers)
+
def test_from_json_dhcp_nic1(self):
def dummy_numbered_nics(nic_mapping=None):
return {"nic1": "em3"}