[Zope3-checkins] CVS: Zope3/src/zope/app/mail/tests - test_maildir.py:1.5
Marius Gedminas
mgedmin@codeworks.lt
Tue, 1 Jul 2003 05:46:54 -0400
Update of /cvs-repository/Zope3/src/zope/app/mail/tests
In directory cvs.zope.org:/tmp/cvs-serv2563/src/zope/app/mail/tests
Modified Files:
test_maildir.py
Log Message:
Get rid of deprecation warnings in maildir module tests with Python 2.3.
=== Zope3/src/zope/app/mail/tests/test_maildir.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/mail/tests/test_maildir.py:1.4 Tue Jul 1 03:17:51 2003
+++ Zope3/src/zope/app/mail/tests/test_maildir.py Tue Jul 1 05:46:53 2003
@@ -126,7 +126,7 @@
def writelines(self, lines):
self._written += ''.join(lines)
-def fake_open(filename, mode):
+def fake_open(self, filename, mode):
return FakeFile(filename, mode)
@@ -141,13 +141,13 @@
maildir_module.os = self.fake_os_module = FakeOsModule()
maildir_module.time = FakeTimeModule()
maildir_module.socket = FakeSocketModule()
- maildir_module.open = fake_open
+ maildir_module.MaildirMessageWriter.open = fake_open
def tearDown(self):
self.maildir_module.os = self.old_os_module
self.maildir_module.time = self.old_time_module
self.maildir_module.socket = self.old_socket_module
- del self.maildir_module.open
+ self.maildir_module.MaildirMessageWriter.open = open
self.fake_os_module._stat_never_fails = False
def test_factory(self):