summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topotest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/lib/topotest.py')
-rw-r--r--tests/topotests/lib/topotest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py
index 611230064f..76a9430fa5 100644
--- a/tests/topotests/lib/topotest.py
+++ b/tests/topotests/lib/topotest.py
@@ -44,8 +44,10 @@ from lib.topolog import logger
if sys.version_info[0] > 2:
import configparser
+ from collections.abc import Mapping
else:
import ConfigParser as configparser
+ from collections import Mapping
from lib import micronet
from lib.micronet_compat import Node
@@ -2071,3 +2073,7 @@ def frr_unicode(s):
return s
else:
return unicode(s) # pylint: disable=E0602
+
+
+def is_mapping(o):
+ return isinstance(o, Mapping)