Skip to content

Commit 55e4cf5

Browse files
author
yuekyang
committed
Empty prefix
1 parent 8836aa4 commit 55e4cf5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ncdiff/src/yang/ncdiff/tests/test_ncdiff.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,7 @@ def test_get_1(self):
46434643
self.assertEqual(name, ['Mgmt-intf'])
46444644

46454645
def test_default_in_use_1(self):
4646-
prefixes = {n[1]: n[2] for n in self.d.namespaces}
4646+
prefixes = {n[1]: n[2] for n in self.d.namespaces if n[1] is not None}
46474647
nodes = self.d.models["jon"].tree.xpath(
46484648
"/jon/jon:address",
46494649
namespaces=prefixes,
@@ -4662,7 +4662,7 @@ def test_default_in_use_2(self):
46624662
"/jon:location/city/alberta",
46634663
"/jon:location/city/alberta/other-info/geo-facts/code",
46644664
]
4665-
prefixes = {n[1]: n[2] for n in self.d.namespaces}
4665+
prefixes = {n[1]: n[2] for n in self.d.namespaces if n[1] is not None}
46664666
nodes = self.d.models["jon"].tree.xpath(
46674667
"/jon/jon:location",
46684668
namespaces=prefixes,
@@ -4689,7 +4689,7 @@ def test_default_in_use_3(self):
46894689
"/oc-if:interfaces/interface/oc-vlan:routed-vlan/oc-ip:ipv4"
46904690
"/state/enabled",
46914691
]
4692-
prefixes = {n[1]: n[2] for n in self.d.namespaces}
4692+
prefixes = {n[1]: n[2] for n in self.d.namespaces if n[1] is not None}
46934693
nodes = self.d.models["openconfig-interfaces"].tree.xpath(
46944694
"//oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/oc-ip:ipv4",
46954695
namespaces=prefixes,

0 commit comments

Comments
 (0)