[Zope3-checkins] CVS: Zope3/src/zope/app/mail/tests - test_asyncmailservice.py:1.3 test_directives.py:1.3 test_simplemailer.py:1.3
Viktorija Zaksiene
ryzaja@codeworks.lt
Mon, 19 May 2003 06:03:38 -0400
Update of /cvs-repository/Zope3/src/zope/app/mail/tests
In directory cvs.zope.org:/tmp/cvs-serv17755/tests
Modified Files:
test_asyncmailservice.py test_directives.py
test_simplemailer.py
Log Message:
Cleanup: removed unneeded whitespaces and duplicated classes (SimpleMailer
and MailSentEvent).
=== Zope3/src/zope/app/mail/tests/test_asyncmailservice.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/mail/tests/test_asyncmailservice.py:1.2 Thu May 1 15:35:24 2003
+++ Zope3/src/zope/app/mail/tests/test_asyncmailservice.py Mon May 19 06:03:37 2003
@@ -69,7 +69,7 @@
self.assertEqual(['blah@bar.com'], mailer.toaddrs)
self.assertEqual('This is a message', mailer.message)
-
+
def test_suite():
return TestSuite((
=== Zope3/src/zope/app/mail/tests/test_directives.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/mail/tests/test_directives.py:1.2 Thu May 1 15:35:24 2003
+++ Zope3/src/zope/app/mail/tests/test_directives.py Mon May 19 06:03:37 2003
@@ -25,7 +25,7 @@
from zope.app.component.metaconfigure import managerHandler, provideInterface
import zope.app.mail
-import zope.app.interfaces.mail
+import zope.app.interfaces.mail
template = """<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
@@ -46,17 +46,17 @@
XMLConfig('metameta.zcml', zope.configuration)()
XMLConfig('meta.zcml', zope.app.mail)()
- def test_mailservice(self):
+ def test_mailservice(self):
xmlconfig(StringIO(template % (
- '''
+ '''
<mail:mailservice name="Mail"
hostname="somehost" port="125"
username="foo" password="bar"
- class=".mail.AsyncMailService"
+ class=".mail.AsyncMailService"
permission="zope.Public" />
'''
)), None, Context([], zope.app.mail))
- service = getService(None, 'Mail')
+ service = getService(None, 'Mail')
self.assertEqual('AsyncMailService', service.__class__.__name__)
self.assertEqual('somehost', service.hostname)
self.assertEqual(125, service.port)
@@ -65,12 +65,12 @@
def test_mailer(self):
xmlconfig(StringIO(template % (
- '''
- <mail:mailservice class=".mail.AsyncMailService"
+ '''
+ <mail:mailservice class=".mail.AsyncMailService"
permission="zope.Public" />
- <mail:mailer name="TestSimpleMailer" class=".mailer.SimpleMailer"
- serviceType="Mail" default="True" />
+ <mail:mailer name="TestSimpleMailer" class=".mailer.SimpleMailer"
+ serviceType="Mail" default="True" />
'''
)), None, Context([], zope.app.mail))
=== Zope3/src/zope/app/mail/tests/test_simplemailer.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/mail/tests/test_simplemailer.py:1.2 Thu May 1 15:35:24 2003
+++ Zope3/src/zope/app/mail/tests/test_simplemailer.py Mon May 19 06:03:37 2003
@@ -19,8 +19,8 @@
"""
from unittest import TestCase, TestSuite, makeSuite
from zope.app.interfaces.mail import IMailer
-from zope.app.mail.event import MailSentEvent
-import zope.app.mail.mailer
+from zope.app.mail.event import MailSentEvent
+import zope.app.mail.mailer
from zope.component.tests.placelesssetup import PlacelessSetup
import zope.app.event.tests.placelesssetup as event_setup
@@ -76,12 +76,12 @@
SMTPStub.toaddrs = ['blah@bar.com', 'booh@bar.com']
SMTPStub.message = 'This is the message'
zope.app.mail.mailer.SMTP = SMTPStub
-
+
self.obj.send('foo@bar.com', ['blah@bar.com', 'booh@bar.com'],
'This is the message', 'localhost', 1025,
'srichter', 'blah');
self.assertEqual(MailSentEvent, event_setup.events[0].__class__)
-
+
def test_suite():
return TestSuite((