Migrate cvp-sanity to Python3
* use print function from future
* convert dict keys and values to list
* do not use bunch imports
* fix requirements mismatch
Related: PROD-33849
Change-Id: Ifecc3a9dcdcfe3243f7dcf2c709a80e9a7c765a1
diff --git a/test_set/cvp-sanity/tests/test_default_gateway.py b/test_set/cvp-sanity/tests/test_default_gateway.py
index 259abba..31c2447 100644
--- a/test_set/cvp-sanity/tests/test_default_gateway.py
+++ b/test_set/cvp-sanity/tests/test_default_gateway.py
@@ -12,7 +12,7 @@
gateways = {}
- for node in netstat_info.keys():
+ for node in list(netstat_info.keys()):
gateway = netstat_info[node]
if isinstance(gateway, bool):
gateway = 'Cannot access node(-s)'
@@ -21,7 +21,7 @@
else:
gateways[gateway].append(node)
- assert len(gateways.keys()) == 1, (
+ assert len(list(gateways.keys())) == 1, (
"There is a problem with default gateway for '{}' group of nodes:\n"
"{}".format(group, json.dumps(gateways, indent=4))
)