diff options
| author | Barry Warsaw | 2012-03-06 11:57:17 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2012-03-06 11:57:17 -0500 |
| commit | 4ca5055eea7c521e620de8ceeff6fa538b7a0c0b (patch) | |
| tree | 63f24624049b82974c9302f4663ae1d4d2cd1146 /src/mailman/app/tests/test_notifications.py | |
| parent | e2526bfa5cb3338ac98f101f3020b54c002252dc (diff) | |
| download | mailman-4ca5055eea7c521e620de8ceeff6fa538b7a0c0b.tar.gz mailman-4ca5055eea7c521e620de8ceeff6fa538b7a0c0b.tar.zst mailman-4ca5055eea7c521e620de8ceeff6fa538b7a0c0b.zip | |
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 |
