convert key iterator to list as python 3 wont index an iterator

This commit is contained in:
Anthony Shaw 2017-11-22 08:10:36 +00:00
parent ba0280e727
commit 25427d845e
No known key found for this signature in database
GPG key ID: AB4A19AE1CE85744

View file

@ -311,11 +311,11 @@ class NapalmNetworkModuleTestCase(TestCase, LoaderModuleMockMixin):
def test_traceroute(self):
ret = napalm_network.traceroute('destination.com')
assert ret['out'].keys()[0] == 'success'
assert list(ret['out'].keys())[0] == 'success'
def test_ping(self):
ret = napalm_network.ping('destination.com')
assert ret['out'].keys()[0] == 'success'
assert list(ret['out'].keys())[0] == 'success'
def test_arp(self):
ret = napalm_network.arp()