You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by lu...@apache.org on 2017/02/13 22:18:18 UTC

svn commit: r1782893 - /subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py

Author: luke1410
Date: Mon Feb 13 22:18:18 2017
New Revision: 1782893

URL: http://svn.apache.org/viewvc?rev=1782893&view=rev
Log:
Use the common function (which was introduced after this test was added) to
create http connections throughout the test suite.

Note: This also resolves test failures when running the mod_authz_svn
tests on certain set ups.

* subversion/tests/cmdline/mod_authz_svn_tests.py
  (verify_get): use svn.test.create_http_connection rather than its separate
   code to establish a http(s) connection

Modified:
    subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py?rev=1782893&r1=1782892&r2=1782893&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py Mon Feb 13 22:18:18 2017
@@ -101,25 +101,11 @@ def write_authz_file_groups(sbox):
 
 def verify_get(test_area_url, path, user, pw,
                expected_status, expected_body, headers):
-  try:
-    # Python <3.0
-    import httplib
-    from urlparse import urlparse
-  except ImportError:
-    # Python >=3.0
-    import http.client as httplib
-    from urllib.parse import urlparse
-
   import base64
 
   req_url = test_area_url + path
 
-  loc = urlparse(req_url)
-
-  if loc.scheme == 'http':
-    h = httplib.HTTPConnection(loc.hostname, loc.port)
-  else:
-    h = httplib.HTTPSConnection(loc.hostname, loc.port)
+  h = svntest.main.create_http_connection(req_url)
 
   if headers is None:
     headers = {}