diff options
Diffstat (limited to 'src/mailman/app/tests/test_notifications.py')
| -rw-r--r-- | src/mailman/app/tests/test_notifications.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mailman/app/tests/test_notifications.py b/src/mailman/app/tests/test_notifications.py index 392cc535d..42f482582 100644 --- a/src/mailman/app/tests/test_notifications.py +++ b/src/mailman/app/tests/test_notifications.py @@ -74,6 +74,9 @@ Welcome to the $list_name mailing list. os.makedirs(path) with open(os.path.join(path, 'welcome.txt'), 'w') as fp: print('You just joined the $list_name mailing list!', file=fp) + # Python 2.7 has assertMultiLineEqual. Let this work without bounds. + self.maxDiff = None + self.eq = getattr(self, 'assertMultiLineEqual', self.assertEqual) def tearDown(self): config.pop('template config') @@ -91,12 +94,7 @@ Welcome to the $list_name mailing list. message = messages[0].msg self.assertEqual(str(message['subject']), 'Welcome to the "Test List" mailing list') - try: - eq = self.assertMultiLineEqual - except AttributeError: - # Python 2.6 - eq = self.assertEqual - eq(message.get_payload(), """\ + self.eq(message.get_payload(), """\ Welcome to the Test List mailing list. Posting address: test@example.com |
