Skip to content

Commit 6be504e

Browse files
committed
Adding unittest for pano > ao; should be shared object
1 parent 3a95ff3 commit 6be504e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_integration.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,19 @@ def test_set_xpath_from_addressobject_with_dg_panorama_parents(self):
658658

659659
self.assertEqual(expected, ret_val)
660660

661+
def test_xpath_from_addressobject_with_pano_parent(self):
662+
expected = "/config/shared/address/entry[@name='shared ao']"
663+
664+
ao = pandevice.objects.AddressObject('shared ao')
665+
pano = pandevice.panorama.Panorama('pano')
666+
pano.get_device_version = mock.Mock(return_value=(7, 0, 0))
667+
668+
pano.add(ao)
669+
670+
ret_val = ao.xpath()
671+
672+
self.assertEqual(expected, ret_val)
673+
661674

662675
class TestVariousSubinterfaceXpaths(unittest.TestCase):
663676
def test_l2_subinterface_with_firewall_parent(self):

0 commit comments

Comments
 (0)