diff options
Diffstat (limited to 'src/mailman/utilities/tests')
| -rw-r--r-- | src/mailman/utilities/tests/test_import.py | 6 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_interact.py | 2 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_templates.py | 10 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_uid.py | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py index 0d245d594..d74a198df 100644 --- a/src/mailman/utilities/tests/test_import.py +++ b/src/mailman/utilities/tests/test_import.py @@ -668,8 +668,10 @@ class TestConvertToURI(unittest.TestCase): def test_substitutions(self): test_text = ('UNIT TESTING %(real_name)s mailing list\n' '%(real_name)s@%(host_name)s') - expected_text = ('UNIT TESTING $display_name mailing list\n' - '$listname') + expected_text = ('UNIT TESTING $display_name mailing list ' + '-- $listname\n' + 'To unsubscribe send an email to ' + '${short_listname}-leave@${domain}') for oldvar, newvar in self._conf_mapping.items(): self._pckdict[str(oldvar)] = str(test_text) import_config_pck(self._mlist, self._pckdict) diff --git a/src/mailman/utilities/tests/test_interact.py b/src/mailman/utilities/tests/test_interact.py index d3803ab28..d6a2fcf0d 100644 --- a/src/mailman/utilities/tests/test_interact.py +++ b/src/mailman/utilities/tests/test_interact.py @@ -77,7 +77,7 @@ class TestInteract(unittest.TestCase): self.assertEqual(stderr[0], 'Welcome') def test_interact_no_upframe(self): - upframed = False # noqa + upframed = False # noqa: F841 fp = self._enter(NamedTemporaryFile('w', encoding='utf-8')) self._enter(hackenv('PYTHONSTARTUP', fp.name)) print('print(upframed)', file=fp) diff --git a/src/mailman/utilities/tests/test_templates.py b/src/mailman/utilities/tests/test_templates.py index 4e05f13c6..02c77d0fa 100644 --- a/src/mailman/utilities/tests/test_templates.py +++ b/src/mailman/utilities/tests/test_templates.py @@ -77,7 +77,7 @@ class TestSearchOrder(unittest.TestCase): def test_fully_specified_search_order(self): search_order = self._stripped_search_order('foo.txt', self.mlist, 'it') # For convenience. - def nexteq(path): # noqa + def nexteq(path): # noqa: E306 self.assertEqual(next(search_order), path) # 1: Use the given language argument nexteq('/v/templates/lists/l.example.com/it/foo.txt') @@ -107,7 +107,7 @@ class TestSearchOrder(unittest.TestCase): def test_no_language_argument_search_order(self): search_order = self._stripped_search_order('foo.txt', self.mlist) # For convenience. - def nexteq(path): # noqa + def nexteq(path): # noqa: E306 self.assertEqual(next(search_order), path) # 1: Use mlist.preferred_language nexteq('/v/templates/lists/l.example.com/de/foo.txt') @@ -132,7 +132,7 @@ class TestSearchOrder(unittest.TestCase): def test_no_mailing_list_argument_search_order(self): search_order = self._stripped_search_order('foo.txt', language='it') # For convenience. - def nexteq(path): # noqa + def nexteq(path): # noqa: E306 self.assertEqual(next(search_order), path) # 1: Use the given language argument nexteq('/v/templates/site/it/foo.txt') @@ -148,7 +148,7 @@ class TestSearchOrder(unittest.TestCase): def test_no_optional_arguments_search_order(self): search_order = self._stripped_search_order('foo.txt') # For convenience. - def nexteq(path): # noqa + def nexteq(path): # noqa: E306 self.assertEqual(next(search_order), path) # 1: Use the site's default language nexteq('/v/templates/site/fr/foo.txt') @@ -180,7 +180,7 @@ class TestFind(unittest.TestCase): self.mlist.preferred_language = 'xx' self.fp = None # Populate the template directories with a few fake templates. - def write(text, path): # noqa + def write(text, path): # noqa: E306 os.makedirs(os.path.dirname(path)) with open(path, 'w') as fp: fp.write(text) diff --git a/src/mailman/utilities/tests/test_uid.py b/src/mailman/utilities/tests/test_uid.py index c081ac2c5..e3476dfbc 100644 --- a/src/mailman/utilities/tests/test_uid.py +++ b/src/mailman/utilities/tests/test_uid.py @@ -54,7 +54,7 @@ class TestUID(unittest.TestCase): def test_uid_record_try_again(self): called = False - def record_second(ignore): # noqa + def record_second(ignore): # noqa: E306 nonlocal called if not called: called = True |
