From cfabfd5b7e87233bd4dfe43111be4ab64e035dfd Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Thu, 4 Feb 2021 14:45:05 +0000 Subject: [PATCH] string checks in the nose plugin --- tools/marvin/marvin/cloudstackTestCase.py | 8 ++++++++ tools/marvin/marvin/marvinPlugin.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/marvin/marvin/cloudstackTestCase.py b/tools/marvin/marvin/cloudstackTestCase.py index ddea9a8fa45..1697ae45f28 100644 --- a/tools/marvin/marvin/cloudstackTestCase.py +++ b/tools/marvin/marvin/cloudstackTestCase.py @@ -75,3 +75,11 @@ class cloudstackTestCase(unittest.case.TestCase): except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return + + def assertEqual(self, first, second, msg=None): + """Fail if the two objects are unequal as determined by the '==' + operator. + """ + if isinstance(msg, str): + msg = msg.encode() + super(cloudstackTestCase,self).assertEqual(first,second,msg) diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index f8501caf122..ec75b6114f1 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -171,7 +171,7 @@ class MarvinPlugin(Plugin): if not self.__testName: self.__testName = "test" self.__testClient.identifier = '-'.\ - join([self.__identifier, self.__testName]) + join([self.__identifier if self.__identifier != None else "marvinTest", self.__testName]) if self.__tcRunLogger: self.__tcRunLogger.name = test.__str__()