Commit Graph

96 Commits

Author SHA1 Message Date
R David Murray aaf17b33a5 #19192: Give up on time.xmlrpc.com as an xmlrpc network test.
time.xmlrpc.com has come and gone over the years, and has been gone again for
a while.  The test did test one thing that the current xmlrpc tests don't: the
use of multiple levels of attribute names in the call.  So in addition to
removing the network test, we add a test in xmlrpc of dotted name access.

There should also be a test for when dotted name access is disallowed, but
that requires more extensive test harness refactoring, and in any case was not
tested by the network test we are deleting, since it is a server-side setting.

This is a slightly simplified version of a patch by Vajrasky Kok.
2013-10-11 12:09:51 -04:00
Ezio Melotti 8281e7c24c #18453: merge with 3.3. 2013-08-10 18:37:36 +03:00
Ezio Melotti 319163244a #18453: fix unused variables in test_xmlrpc. Patch by Vajrasky Kok. 2013-08-10 18:37:05 +03:00
Brett Cannon 260fbe80c5 Issue #15767: Excise the remaining instances of ModuleNotFoundError 2013-07-04 18:16:15 -04:00
Brett Cannon e382b5868a Partially revert changeset #281857369a78 to make sure threads are
reaped in all situations.
2013-06-12 21:25:23 -04:00
Brett Cannon 603dcf2714 Spruce up test_xmlrpc by using ModuleNotFoundError and moving to
unittest.main().
2013-06-12 20:04:19 -04:00
Andrew Svetlov 0832af6628 Issue #16717: get rid of socket.error, replace with OSError 2012-12-18 23:10:48 +02:00
Florent Xicluna 1917ea964e Add tests to marshall double with xmlrpc.client. 2012-07-07 17:03:25 +02:00
Charles-François Natali 3ccc918b4a Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 15:02:10 +01:00
Charles-François Natali cd96b4f1ff Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 14:53:41 +01:00
Florent Xicluna 1b7458b2a1 Closes #2979: add parameter 'use_builtin_types' to the SimpleXMLRPCServer. 2011-12-09 22:35:06 +01:00
Florent Xicluna 6166519d2b Closes #13297: use bytes type to send and receive binary data through XMLRPC. 2011-11-15 20:53:25 +01:00
Florent Xicluna c4fec937dc Cleanup xmlrpc: remove obsolete comments, unused imports. Add test for bytes marshalling. 2011-10-30 20:19:32 +01:00
Florent Xicluna 3fa29f7cd7 Closes #13291: NameError in xmlrpc package. 2011-10-30 20:18:50 +01:00
Ezio Melotti e130a52d8a Remove duplication. 2011-10-19 10:58:56 +03:00
Victor Stinner da6eb5305f Issue #12931: Add a test with Unicode URI to test_xmlrpc 2011-09-23 01:29:44 +02:00
Victor Stinner a935e8ffc6 test_xmlrpc: close the transport when done
Fix a ResourceWarning(unclosed socket). Patch written by Nadeem Vawda.
2011-01-03 14:30:44 +00:00
Ezio Melotti ed3a7d2d60 #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex. 2010-12-01 02:32:32 +00:00
Ezio Melotti 19f2aeba67 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Antoine Pitrou c9a9417f48 Merged revisions 86533 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86533 | antoine.pitrou | 2010-11-19 21:07:52 +0100 (ven., 19 nov. 2010) | 3 lines

  Fix test_ssl_presence when ssl is not present
........
2010-11-19 20:10:53 +00:00
Antoine Pitrou 98b644ff3f Fix test_ssl_presence when ssl is not present 2010-11-19 20:07:52 +00:00
Senthil Kumaran dae5b84fe7 Merged revisions 86523 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86523 | senthil.kumaran | 2010-11-19 01:08:48 +0800 (Fri, 19 Nov 2010) | 3 lines

  Code Changes as per review comments by Antoine Pitrou.
........
2010-11-18 17:11:45 +00:00
Senthil Kumaran 6a0b5c414c Code Changes as per review comments by Antoine Pitrou. 2010-11-18 17:08:48 +00:00
Senthil Kumaran f2849f0fb4 Merged revisions 86514 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86514 | senthil.kumaran | 2010-11-18 23:00:53 +0800 (Thu, 18 Nov 2010) | 3 lines

  Fix Issue 9991: xmlrpc client ssl check faulty
........
2010-11-18 15:04:41 +00:00
Senthil Kumaran 8ce1f1ff83 Fix Issue 9991: xmlrpc client ssl check faulty 2010-11-18 15:00:53 +00:00
Victor Stinner 45df820591 Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
2010-04-28 22:31:17 +00:00
R. David Murray 378c0cf5ab Merged revisions 78351 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines

  Issue 6292: for the moment at least, the test suite passes if run
  with -OO.  Tests requiring docstrings are skipped.  Patch by
  Brian Curtin, thanks to Matias Torchinsky for helping review and
  improve the patch.
........
2010-02-24 01:46:21 +00:00
Ezio Melotti e96159335f Merged revisions 77727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line

  use assert[Not]IsInstance where appropriate
........
2010-01-24 19:26:24 +00:00
Kristján Valur Jónsson 1f2a1ae388 Merged revisions 74558 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74558 | kristjan.jonsson | 2009-08-27 23:13:18 +0000 (fim., 27 ßg·. 2009) | 2 lines

  Issue 6654
  Allow the XML-RPC server to use the HTTP request path when dispatching.  Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.
........
2009-12-16 10:50:44 +00:00
Antoine Pitrou e03866f6f1 Merged revisions 75962-75963 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75962 | antoine.pitrou | 2009-10-30 18:55:21 +0100 (ven., 30 oct. 2009) | 3 lines

  Try to fix transient refleaks in test_asynchat.
........
  r75963 | antoine.pitrou | 2009-10-30 18:56:00 +0100 (ven., 30 oct. 2009) | 3 lines

  Try to fix transient refleaks in test_xmlrpc.
........
2009-10-30 17:58:27 +00:00
R. David Murray 0548ce088d Make the XMLRCP CGIHandlerTestCase pass like it did before the change of
the test to use StringIO instead of a temp file.  There may or may not
be an underlying problem here, so this patch makes the test function
as originally designed until a determination can be made as to whether
or not there is an underlying bug here.  See issue 7165 for discussion.
2009-10-26 08:24:14 +00:00
Nick Coghlan 6ead552b47 Note that a number of the changes listed below were not applicable to the Py3k branch, and hence the corresponding
files are unchanged in this checkin. This checkin is also the first time the environment checking in regrtest has
been forward ported to the Py3k branch.

This checkin causes test_xmlrpc to fail - see issue 7165 (it's a bug in the 3.x version of xmlrpc.server)
I am also getting a failure in test_telnetlib, but it isn't clear yet if that is due to these changes.

Recorded merge of revisions 75400-75401,75404,75406,75414,75416,75422,75425-75428,75435,75439,75441-75444,75447-75449,75451-75453,75455-75458,75460-75469,75471-75473,75475-75477,75479-75481,75483,75486-75489 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75400 | r.david.murray | 2009-10-14 23:58:07 +1000 (Wed, 14 Oct 2009) | 6 lines

  Enhanced Issue 7058 patch, which will not be backported.  Refactors the
  code, adds checks for stdin/out/err, cwd, and sys.path, and adds a new
  section in the summary for tests that modify the environment (thanks to
  Ezio Melotti for that suggestion).
........
  r75453 | nick.coghlan | 2009-10-17 16:33:05 +1000 (Sat, 17 Oct 2009) | 1 line

  Correctly restore sys.stdout in test_descr
........
  r75456 | nick.coghlan | 2009-10-17 17:30:40 +1000 (Sat, 17 Oct 2009) | 1 line

  Enhancement to the new environment checking code to print the changed items under -vv. Also includes a small tweak to allow underscores in the names of resources.
........
  r75457 | nick.coghlan | 2009-10-17 17:34:27 +1000 (Sat, 17 Oct 2009) | 1 line

  Formatting tweak so that before and after values are vertically aligned
........
  r75458 | nick.coghlan | 2009-10-17 18:21:21 +1000 (Sat, 17 Oct 2009) | 1 line

  Check and revert expected sys.path alterations
........
  r75461 | nick.coghlan | 2009-10-18 00:40:54 +1000 (Sun, 18 Oct 2009) | 1 line

  Restore original sys.path when running TTK tests
........
  r75462 | nick.coghlan | 2009-10-18 01:09:41 +1000 (Sun, 18 Oct 2009) | 1 line

  Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
........
  r75463 | nick.coghlan | 2009-10-18 01:23:08 +1000 (Sun, 18 Oct 2009) | 1 line

  Revert changes made to environment in test_httpservers
........
  r75465 | nick.coghlan | 2009-10-18 01:45:52 +1000 (Sun, 18 Oct 2009) | 1 line

  Move restoration of the os.environ object into the context manager where it belongs
........
  r75466 | nick.coghlan | 2009-10-18 01:48:16 +1000 (Sun, 18 Oct 2009) | 1 line

  Also check and restore identity of sys.path, sys.argv and os.environ rather than just their values (this picked up a few more misbehaving tests)
........
  r75467 | nick.coghlan | 2009-10-18 01:57:42 +1000 (Sun, 18 Oct 2009) | 1 line

  Avoid replacing existing modules and sys.path in import tests
........
  r75468 | nick.coghlan | 2009-10-18 02:19:51 +1000 (Sun, 18 Oct 2009) | 1 line

  Don't replace sys.path in test_site
........
  r75481 | nick.coghlan | 2009-10-18 15:38:48 +1000 (Sun, 18 Oct 2009) | 1 line

  Using CleanImport to revert a reload of the os module doesn't work due to function registrations in copy_reg. The perils of reloading modules even for tests...
........
  r75486 | nick.coghlan | 2009-10-18 20:29:10 +1000 (Sun, 18 Oct 2009) | 1 line

  Silence a deprecation warning by using the appropriate replacement construct
........
  r75489 | nick.coghlan | 2009-10-18 20:56:21 +1000 (Sun, 18 Oct 2009) | 1 line

  Restore sys.path in test_tk
........
2009-10-18 13:19:33 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Kristján Valur Jónsson aefde242fd porting revision 74098 from trunk:
http://bugs.python.org/issue6499
zlib/gzip may not be present for all builds.  Make xmlrpclib gracefully not supporg gzip encoding in this case
2009-07-19 22:29:24 +00:00
Kristján Valur Jónsson f6087ca999 merging revision 73986 from trunk:
http://bugs.python.org/issue6267
Add more tests for the xlmrpc.ServerProxy
2009-07-12 22:45:18 +00:00
Kristján Valur Jónsson 1bbb19aad2 merging revision 73932 from trunk:
http://bugs.python.org/issue6460
Need to be careful with thread switching when testing the xmlrpc server.  The server thread may not have updated stats when the client thread tests them.
2009-07-11 21:57:16 +00:00
Kristján Valur Jónsson 985fc6a304 http://bugs.python.org/issue6267
porting revision 73638 to py3k
2009-07-01 10:01:31 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Georg Brandl b54d801280 #3613: add base64.encodebytes and decodebytes as the new spelling of encodestring and decodestring; deprecate the latter. 2009-06-04 09:11:51 +00:00
Walter Dörwald 155374d95d Merged revisions 72167 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72167 | walter.doerwald | 2009-05-01 19:35:37 +0200 (Fr, 01 Mai 2009) | 5 lines

  Make test.test_support.EnvironmentVarGuard behave like a dictionary.

  All changes are mirrored to the underlying os.environ dict, but rolled back
  on exit from the with block.
........
2009-05-01 19:58:58 +00:00
Walter Dörwald b525e18500 Merged revisions 71984 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71984 | walter.doerwald | 2009-04-26 22:51:44 +0200 (So, 26 Apr 2009) | 2 lines

  Use test.test_support.EnvironmentVarGuard where tests change environment vars.
........
2009-04-26 21:39:21 +00:00
Senthil Kumaran b3af08f84c Fix for issue5040. Adding support for unicode message passing and tests for unicode message and test for Content-Length. 2009-04-01 20:20:43 +00:00
Georg Brandl c748506427 #5636: fix next -> __next__ in csv reader docs. 2009-04-01 15:53:15 +00:00
Georg Brandl c8dcfb6cec part of #3613: fix get_host_info() usage of base64.encodestring(). 2009-02-13 10:50:01 +00:00
Benjamin Peterson e1cdfd78d8 Merged revisions 68547,68607,68610,68618,68621-68622,68649,68722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68547 | kristjan.jonsson | 2009-01-12 12:09:27 -0600 (Mon, 12 Jan 2009) | 1 line

  Add tests for invalid format specifiers in strftime, and for handling of invalid file descriptors in the os module.
........
  r68607 | kristjan.jonsson | 2009-01-14 04:50:57 -0600 (Wed, 14 Jan 2009) | 2 lines

  Re-enable all tests for windows platforms.
  Also, explicitly connect to the IPV4 address.  On windows platforms supporting AF_INET6, the SocketProxy would connect using socket.create_connection('localhost', port) which would cycle through all address families and try to connect.  It would try connecting using AF_INET6 first and this would cause a delay of up to a second.
........
  r68610 | kristjan.jonsson | 2009-01-15 03:09:13 -0600 (Thu, 15 Jan 2009) | 3 lines

  Fix recently introduced test cases.
  For datetime, gentoo didn't seem to mind the %e format for strftime.  So, we just excercise those instead making sure that we don't crash.
  For test_os, two cases were incorrect.
........
  r68618 | kristjan.jonsson | 2009-01-15 11:20:21 -0600 (Thu, 15 Jan 2009) | 1 line

  Issue 4929:  Handle socket errors when receiving
........
  r68621 | kristjan.jonsson | 2009-01-15 16:40:03 -0600 (Thu, 15 Jan 2009) | 1 line

  Fix two test cases in test_os.  ftruncate raises IOError unlike all the others which raise OSError.  And close() on some platforms doesn't complain when given an invalid file descriptor.
........
  r68622 | kristjan.jonsson | 2009-01-15 16:46:26 -0600 (Thu, 15 Jan 2009) | 1 line

  Make all the invalid fd tests for os subject to the function being available.
........
  r68649 | benjamin.peterson | 2009-01-16 22:39:05 -0600 (Fri, 16 Jan 2009) | 1 line

  trying to find some fpathconf() settings that all unixs support...
........
  r68722 | kristjan.jonsson | 2009-01-18 04:58:44 -0600 (Sun, 18 Jan 2009) | 1 line

  issue 4293:  make test_capi.py more robutst, it times out on some platforms, presumably waiting for threads.  Lower the thread count to 16.
........
2009-01-18 21:02:37 +00:00
Jeremy Hylton 1afc169616 Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser.
The old modules have all been removed.  The new package has five
submodules: urllib.parse, urllib.request, urllib.response,
urllib.error, and urllib.robotparser.  The urllib.request.urlopen()
function uses the url opener from urllib2.

Note that the unittests have not been renamed for the
beta, but they will be renamed in the future.

Joint work with Senthil Kumaran.
2008-06-18 20:49:58 +00:00
Barry Warsaw 820c120059 Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry.  This removes mimetools from the stdlib.
2008-06-12 04:06:45 +00:00
Benjamin Peterson 1e637b7373 fix hanging test_xmlrpc 2008-06-11 21:55:48 +00:00
Georg Brandl 2442015af2 Create http package. #2883. 2008-05-26 16:32:26 +00:00