[Python-checkins] cpython: Regularize test_email/test_headerregistry's references to policy.
r.david.murray
python-checkins at python.org
Tue May 29 02:22:56 CEST 2012
http://hg.python.org/cpython/rev/7c70eb6537b8
changeset: 77215:7c70eb6537b8
user: R David Murray <rdmurray at bitdance.com>
date: Mon May 28 20:22:37 2012 -0400
summary:
Regularize test_email/test_headerregistry's references to policy.
files:
Lib/test/test_email/test_headerregistry.py | 12 +++++-----
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Lib/test/test_email/test_headerregistry.py b/Lib/test/test_email/test_headerregistry.py
--- a/Lib/test/test_email/test_headerregistry.py
+++ b/Lib/test/test_email/test_headerregistry.py
@@ -650,14 +650,14 @@
def test_short_unstructured(self):
h = self.make_header('subject', 'this is a test')
- self.assertEqual(h.fold(policy=self.policy),
+ self.assertEqual(h.fold(policy=policy.default),
'subject: this is a test\n')
def test_long_unstructured(self):
h = self.make_header('Subject', 'This is a long header '
'line that will need to be folded into two lines '
'and will demonstrate basic folding')
- self.assertEqual(h.fold(policy=self.policy),
+ self.assertEqual(h.fold(policy=policy.default),
'Subject: This is a long header line that will '
'need to be folded into two lines\n'
' and will demonstrate basic folding\n')
@@ -676,11 +676,11 @@
def test_fold_unstructured_single_word(self):
h = self.make_header('Subject', 'test')
- self.assertEqual(h.fold(policy=self.policy), 'Subject: test\n')
+ self.assertEqual(h.fold(policy=policy.default), 'Subject: test\n')
def test_fold_unstructured_short(self):
h = self.make_header('Subject', 'test test test')
- self.assertEqual(h.fold(policy=self.policy),
+ self.assertEqual(h.fold(policy=policy.default),
'Subject: test test test\n')
def test_fold_unstructured_with_overlong_word(self):
@@ -721,7 +721,7 @@
h = self.make_header('To', '"Theodore H. Perfect" <yes at man.com>, '
'"My address is very long because my name is long" <foo at bar.com>, '
'"Only A. Friend" <no at yes.com>')
- self.assertEqual(h.fold(policy=self.policy), textwrap.dedent("""\
+ self.assertEqual(h.fold(policy=policy.default), textwrap.dedent("""\
To: "Theodore H. Perfect" <yes at man.com>,
"My address is very long because my name is long" <foo at bar.com>,
"Only A. Friend" <no at yes.com>
@@ -729,7 +729,7 @@
def test_fold_date_header(self):
h = self.make_header('Date', 'Sat, 2 Feb 2002 17:00:06 -0800')
- self.assertEqual(h.fold(policy=self.policy),
+ self.assertEqual(h.fold(policy=policy.default),
'Date: Sat, 02 Feb 2002 17:00:06 -0800\n')
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list