← Back to team overview

divmod-dev team mailing list archive

[Merge] lp:~divmod-dev/divmod.org/logdatetimestart-patch-848342 into lp:divmod.org

 

Jean-Paul Calderone has proposed merging lp:~divmod-dev/divmod.org/logdatetimestart-patch-848342 into lp:divmod.org.

Requested reviews:
  Divmod-dev (divmod-dev)
Related bugs:
  Bug #848342 in Divmod Mantissa: "Many Mantissa unit tests fail with new versions of Twisted which lack twisted.web.http._logDateTimeStart"
  https://bugs.launchpad.net/mantissa/+bug/848342

For more details, see:
https://code.launchpad.net/~divmod-dev/divmod.org/logdatetimestart-patch-848342/+merge/75079

This removes the monkeypatching of http._logDateTimeStart from the web integration unit tests.  Twisted 11.0 removed this private function and made the factory responsible the whole thing.  Mantissa doesn't need to do anything to have things work nicely now.

-- 
https://code.launchpad.net/~divmod-dev/divmod.org/logdatetimestart-patch-848342/+merge/75079
Your team Divmod-dev is requested to review the proposed merge of lp:~divmod-dev/divmod.org/logdatetimestart-patch-848342 into lp:divmod.org.
=== modified file 'Mantissa/xmantissa/test/integration/test_web.py'
--- Mantissa/xmantissa/test/integration/test_web.py	2008-09-20 01:06:47 +0000
+++ Mantissa/xmantissa/test/integration/test_web.py	2011-09-12 22:02:28 +0000
@@ -218,10 +218,8 @@
 
         self.factory = self.site.getFactory()
 
-        self.origFunctions = (http._logDateTimeStart,
-                              GuardSession.checkExpired.im_func,
+        self.origFunctions = (GuardSession.checkExpired.im_func,
                               athena.ReliableMessageDelivery)
-        http._logDateTimeStart = lambda: None
         GuardSession.checkExpired = lambda self: None
         athena.ReliableMessageDelivery = lambda *a, **kw: None
 
@@ -230,9 +228,8 @@
         """
         Restore the patched functions to their original state.
         """
-        http._logDateTimeStart = self.origFunctions[0]
-        GuardSession.checkExpired = self.origFunctions[1]
-        athena.ReliableMessageDelivery = self.origFunctions[2]
+        GuardSession.checkExpired = self.origFunctions[0]
+        athena.ReliableMessageDelivery = self.origFunctions[1]
         del self.origFunctions
 
 


Follow ups