[Testbot] Plone 5.0 - Python 2.7 - Build # 3820 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Fri Dec 12 13:28:35 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3820 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3820/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: Products.PasswordResetTool
Branch: refs/heads/master
Date: 2014-12-12T13:54:21+01:00
Author: Timo Stollenwerk () <contact at timostollenwerk.net>
Commit: https://github.com/plone/Products.PasswordResetTool/commit/2fc7203f6f4e3f801fd553d45a71d6819b190165

Set mailhost in the (new) registry to fix test failures; pep8.

Files changed:
M Products/PasswordResetTool/tests/test_doctests.py

diff --git a/Products/PasswordResetTool/tests/test_doctests.py b/Products/PasswordResetTool/tests/test_doctests.py
index 802c4cf..31647b9 100644
--- a/Products/PasswordResetTool/tests/test_doctests.py
+++ b/Products/PasswordResetTool/tests/test_doctests.py
@@ -1,3 +1,6 @@
+from Products.CMFPlone.interfaces import IMailSchema
+from zope.component import getUtility
+from plone.registry.interfaces import IRegistry
 """
 PasswordResetTool doctests
 """
@@ -25,7 +28,10 @@ class MockMailFixture(testing.PloneSandboxLayer):
     def setUpPloneSite(self, portal):
         portal._original_MailHost = portal.MailHost
         portal.MailHost = mailhost = MockMailHost('MailHost')
-        mailhost.smtp_host = 'localhost'
+        registry = getUtility(IRegistry)
+        mail_settings = registry.forInterface(IMailSchema, prefix='plone')
+        mail_settings.smtp_host = u'localhost'
+        mail_settings.email_from_address = 'john at doe.com'
         sm = getSiteManager(context=portal)
         sm.unregisterUtility(provided=IMailHost)
         sm.registerUtility(mailhost, provided=IMailHost)
@@ -36,20 +42,33 @@ def tearDownPloneSite(self, portal):
         portal.MailHost = portal._original_MailHost
         sm = getSiteManager(context=portal)
         sm.unregisterUtility(provided=IMailHost)
-        sm.registerUtility(aq_base(portal._original_MailHost), provided=IMailHost)
+        sm.registerUtility(
+            aq_base(portal._original_MailHost),
+            provided=IMailHost
+        )
 
 MOCK_MAIL_FIXTURE = MockMailFixture()
 MM_FUNCTIONAL_TESTING = testing.FunctionalTesting(
-            bases=(MOCK_MAIL_FIXTURE, ), name='PloneTestCase:Functional')
+    bases=(MOCK_MAIL_FIXTURE, ),
+    name='PloneTestCase:Functional'
+)
 
 
 def test_suite():
     return unittest.TestSuite((
-        layered(doctest.DocFileSuite('browser.txt',
-            optionflags=OPTIONFLAGS,
-            package='Products.PasswordResetTool.tests', ),
-            layer=MM_FUNCTIONAL_TESTING),
-        layered(doctest.DocFileSuite('view.txt',
-            optionflags=OPTIONFLAGS,
-            package='Products.PasswordResetTool.tests', ),
-            layer=MM_FUNCTIONAL_TESTING)))
+        layered(
+            doctest.DocFileSuite(
+                'browser.txt',
+                optionflags=OPTIONFLAGS,
+                package='Products.PasswordResetTool.tests',
+            ),
+            layer=MM_FUNCTIONAL_TESTING
+        ),
+        layered(
+            doctest.DocFileSuite(
+                'view.txt',
+                optionflags=OPTIONFLAGS,
+                package='Products.PasswordResetTool.tests',
+            ),
+            layer=MM_FUNCTIONAL_TESTING))
+        )




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 3101 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20141212/e1bdb607/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 202658 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20141212/e1bdb607/attachment-0003.obj>


More information about the Testbot mailing list