aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit/test_utils.py')
-rw-r--r--functest/tests/unit/test_utils.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/functest/tests/unit/test_utils.py b/functest/tests/unit/test_utils.py
index e171db022..159047649 100644
--- a/functest/tests/unit/test_utils.py
+++ b/functest/tests/unit/test_utils.py
@@ -8,16 +8,22 @@
import re
-class RegexMatch(str):
+class RegexMatch(object):
+ def __init__(self, msg):
+ self.msg = msg
+
def __eq__(self, other):
- match = re.search(self, other)
+ match = re.search(self.msg, other)
if match:
return True
return False
-class SubstrMatch(str):
+class SubstrMatch(object):
+ def __init__(self, msg):
+ self.msg = msg
+
def __eq__(self, other):
- if self in other:
+ if self.msg in other:
return True
return False