Commit c9f91fbe authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend/test: Allow extended msg in assertTestData

parent 4384cd61
......@@ -273,7 +273,7 @@ class TestDataMixin(object):
'%(group)s:%(name)s %(statename)s' % q for q
in self.getSupervisorRPCServer().supervisor.getAllProcessInfo()]))
def assertTestData(self, runtime_data, hash_value=None):
def assertTestData(self, runtime_data, hash_value=None, msg=None):
filename = '%s-%s.txt' % (self.id(), 'CADDY')
test_data_file = os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'test_data', filename)
......@@ -288,10 +288,13 @@ class TestDataMixin(object):
maxDiff = self.maxDiff
self.maxDiff = None
longMessage = self.longMessage
self.longMessage = True
try:
self.assertMultiLineEqual(
test_data,
runtime_data
runtime_data,
msg=msg
)
except AssertionError:
if os.environ.get('SAVE_TEST_DATA', '0') == '1':
......@@ -299,6 +302,7 @@ class TestDataMixin(object):
raise
finally:
self.maxDiff = maxDiff
self.longMessage = longMessage
def _test_file_list(self, slave_dir, IGNORE_PATH_LIST):
runtime_data = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment