diff --git a/dav_events/tests/test_oneclickactions.py b/dav_events/tests/test_oneclickactions.py index beee8c2..10ddbdb 100644 --- a/dav_events/tests/test_oneclickactions.py +++ b/dav_events/tests/test_oneclickactions.py @@ -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):