aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/test_utils.py
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-12-12 13:59:19 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-12 13:59:19 +0000
commit7109cd3916fb120ae773e8ca79ececd449525fac (patch)
treea0d8f6fe5a3ebe34a16fee8c4274c5c17696d64a /functest/tests/unit/test_utils.py
parent9f41633bed117341fe542433ea869bba14011e9f (diff)
parentdf6ee9b1222ebd81fa22ce3499e536abe7bcb05e (diff)
Merge "Add python3 for Functest utils"
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 e171db02..15904764 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