diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/rfc822.py | 7 | ||||
-rw-r--r-- | Lib/test/test_pyclbr.py | 2 | ||||
-rw-r--r-- | Lib/test/test_rfc822.py | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 6495f5f..4b12c4b 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -425,13 +425,6 @@ class Message: for i in list: del self.headers[i] - def get(self, name, default=""): - name = name.lower() - if name in self.dict: - return self.dict[name] - else: - return default - def setdefault(self, name, default=""): lowername = name.lower() if lowername in self.dict: diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py index c745720..0f3319f 100644 --- a/Lib/test/test_pyclbr.py +++ b/Lib/test/test_pyclbr.py @@ -105,7 +105,7 @@ class PyclbrTest(unittest.TestCase): '_isfunction', '_ismodule', '_classify_class_attrs']) - self.checkModule('rfc822') + self.checkModule('rfc822', ignore=["get"]) self.checkModule('difflib') def test_others(self): diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py index 6add15b..756c5c7 100644 --- a/Lib/test/test_rfc822.py +++ b/Lib/test/test_rfc822.py @@ -18,7 +18,7 @@ class MessageTestCase(unittest.TestCase): 'To: "last, first" <userid@foo.net>\n\ntest\n') self.assert_(msg.get("to") == '"last, first" <userid@foo.net>') self.assert_(msg.get("TO") == '"last, first" <userid@foo.net>') - self.assert_(msg.get("No-Such-Header") == "") + self.assert_(msg.get("No-Such-Header") is None) self.assert_(msg.get("No-Such-Header", "No-Such-Value") == "No-Such-Value") |