Fixed a oneclickaction test
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2023-02-15 19:39:09 +01:00
parent 44a570a8bb
commit b95b33f995

View File

@@ -117,15 +117,12 @@ class ActionTestCase(EmailTestMixin, RoleMixin, EventMixin, TestCase):
' von %(user)s'
' auf \'%(status)s\' gesetzt.') % {
'status': status_label,
'date': datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S'),
# 'date': datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S'),
'date': '\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}:\d{2}',
'user': user.get_full_name(),
})
html = message.replace('\'', ''')
# Sometimes this test fail, and we cannot see the tested content, so we create our own Exception
try:
self.assertInHTML(html, content)
except AssertionError:
raise AssertionError('Not in HTML:\n{}\n-----\n{}\n'.format(html, content))
html = message.replace('\'', ''')
self.assertRegex(content, html)
self.assertRegex(content, r'alert-success')
def setUp(self):