+
+
+def UnifyValueType(data):
+ """Converts all tuples into lists.
+
+ This is useful for unittests where an external library doesn't keep types.
+
+ """
+ if isinstance(data, (tuple, list)):
+ return [UnifyValueType(i) for i in data]
+
+ elif isinstance(data, dict):
+ return dict([(UnifyValueType(key), UnifyValueType(value))
+ for (key, value) in data.iteritems()])
+
+ return data