diff options
| -rw-r--r-- | src/mailman/app/tests/test_templates.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/app/tests/test_templates.py b/src/mailman/app/tests/test_templates.py index 40ec6d234..c20c98280 100644 --- a/src/mailman/app/tests/test_templates.py +++ b/src/mailman/app/tests/test_templates.py @@ -132,8 +132,8 @@ class TestTemplateLoader(unittest.TestCase): test_text = b'\xe4\xb8\xad' path = os.path.join(self.var_dir, 'templates', 'site', 'it') os.makedirs(path) - with open(os.path.join(path, 'demo.txt'), 'w') as fp: - print(test_text, end='', file=fp) + with open(os.path.join(path, 'demo.txt'), 'wb') as fp: + fp.write(test_text) content = self._loader.get('mailman:///it/demo.txt') self.assertIsInstance(content, six.text_type) self.assertEqual(content, test_text.decode('utf-8')) |
