summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests
diff options
context:
space:
mode:
authorBarry Warsaw2016-11-25 11:54:10 -0500
committerBarry Warsaw2016-11-25 11:54:10 -0500
commit17ec368191f4e2c80fbead954511bb5a251dfe45 (patch)
treeaa802d1960ac3a096e192e572cd238411dc57ec9 /src/mailman/rest/tests
parent1f4919ab99bc6ca15553e2e4f569313b91b4a752 (diff)
downloadmailman-17ec368191f4e2c80fbead954511bb5a251dfe45.tar.gz
mailman-17ec368191f4e2c80fbead954511bb5a251dfe45.tar.zst
mailman-17ec368191f4e2c80fbead954511bb5a251dfe45.zip
Add NEWS and a little bit of cleanup.
Diffstat (limited to 'src/mailman/rest/tests')
-rw-r--r--src/mailman/rest/tests/test_moderation.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/rest/tests/test_moderation.py b/src/mailman/rest/tests/test_moderation.py
index 628b79e52..7ac23da21 100644
--- a/src/mailman/rest/tests/test_moderation.py
+++ b/src/mailman/rest/tests/test_moderation.py
@@ -211,10 +211,10 @@ class TestSubscriptionModeration(unittest.TestCase):
def test_view_malformed_held_message(self):
# Opening a bad (i.e. bad structure) email and holding it.
- email_path = resource_filename('mailman.rest.tests.data',
- 'bad_email.eml')
- with open(email_path, 'rb') as f:
- msg = message_from_binary_file(f)
+ email_path = resource_filename(
+ 'mailman.rest.tests.data', 'bad_email.eml')
+ with open(email_path, 'rb') as fp:
+ msg = message_from_binary_file(fp)
msg.sender = 'aperson@example.com'
with transaction():
hold_message(self._mlist, msg)
@@ -225,7 +225,7 @@ class TestSubscriptionModeration(unittest.TestCase):
self.assertEqual(response.status, 200)
self.assertEqual(len(content['entries']), 1)
self.assertEqual(content['entries'][0]['msg'],
- 'this message is defective')
+ 'This message is defective')
def test_individual_request(self):
# We can view an individual request.