[Checkins] SVN: zc.authorizedotnet/trunk/s updated tests to run with mechanize 0.2+ thus requiring at least zope.testbrowser 3.9

Michael Howitz mh at gocept.com
Fri Feb 25 02:43:08 EST 2011


Log message for revision 120567:
  updated tests to run with mechanize 0.2+ thus requiring at least zope.testbrowser 3.9
  

Changed:
  U   zc.authorizedotnet/trunk/setup.py
  U   zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py

-=-
Modified: zc.authorizedotnet/trunk/setup.py
===================================================================
--- zc.authorizedotnet/trunk/setup.py	2011-02-24 20:16:27 UTC (rev 120566)
+++ zc.authorizedotnet/trunk/setup.py	2011-02-25 07:43:08 UTC (rev 120567)
@@ -21,7 +21,7 @@
     namespace_packages = ['zc'],
     install_requires = ['setuptools', 'zc.ssl', 'zc.creditcard'],
     include_package_data = True,
-    tests_require = ['zope.testing', 'zope.testbrowser'],
+    tests_require = ['zope.testing', 'zope.testbrowser >= 3.9'],
     test_suite = name+'.tests.test_suite',
     classifiers = [
        'Intended Audience :: Developers',

Modified: zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py
===================================================================
--- zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py	2011-02-24 20:16:27 UTC (rev 120566)
+++ zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py	2011-02-25 07:43:08 UTC (rev 120567)
@@ -16,11 +16,11 @@
 from zope.testbrowser.browser import Browser
 from zope.testing import doctest, renormalizing
 import BaseHTTPServer
-import ClientForm
 import SimpleHTTPServer
 import cgi
 import httplib
 import mechanize
+import mechanize
 import os
 import re
 import threading
@@ -28,13 +28,13 @@
 
 TEST_SERVER_PORT = 30423
 
-class TolerantFormParser(ClientForm.FormParser):
+class TolerantFormParser(mechanize.FormParser):
     """A parser that ignores <input> elements outside of forms."""
 
     def do_input(self, attrs):
         if self._current_form is None:
             return
-        return ClientForm.FormParser.do_input(self, attrs)
+        return mechanize.FormParser.do_input(self, attrs)
 
 
 def makeMechBrowser():
@@ -272,6 +272,3 @@
     unit = doctest.DocTestSuite('zc.authorizedotnet.processing',
                                 optionflags=doctest.ELLIPSIS)
     return unittest.TestSuite((local, remote, unit))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')



More information about the checkins mailing list