Rev 3141: Update NEWS. Some cosmetic changes. in file:///v/home/vila/src/bzr/bugs/175524/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Dec 28 16:51:34 GMT 2007


At file:///v/home/vila/src/bzr/bugs/175524/

------------------------------------------------------------
revno: 3141
revision-id:v.ladeuil+lp at free.fr-20071228165130-iv5p12lfc2fmbb7u
parent: v.ladeuil+lp at free.fr-20071228153347-k84pqeepvol23tj5
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 175524
timestamp: Fri 2007-12-28 17:51:30 +0100
message:
  Update NEWS. Some cosmetic changes.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/http_server.py    httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
  bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
  bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2007-12-22 08:00:58 +0000
+++ b/NEWS	2007-12-28 16:51:30 +0000
@@ -67,6 +67,9 @@
    * Fix traceback when sending large response bodies over the smart protocol
      on Windows. (Andrew Bennetts, #115781)
 
+   * HTTP test servers are now compatible with the http protocol version 1.1.
+     (Vincent Ladeuil, #175524)
+
    * pycurl authentication handling was broken and incomplete. Fix handling of
      user:pass embedded in the urls.
      (Vincent Ladeuil, #177643)
@@ -146,6 +149,10 @@
    * New helper method ``bzrlib.tests.split_suite_by_re`` which splits a test
      suite into two according to a regular expression. (Robert Collins)
 
+   * Parametrize all http tests for the transport implementations, the http
+     protocol versions (1.0 and 1.1) and the authentication schemes.
+     (Vincent Ladeuil) 
+
    * The ``exclude_pattern`` and ``random_order`` parameters to the function
      ``bzrlib.tests.filter_suite_by_re`` have been deprecated. (Robert Collins)
 

=== modified file 'bzrlib/tests/http_server.py'
--- a/bzrlib/tests/http_server.py	2007-12-28 15:28:44 +0000
+++ b/bzrlib/tests/http_server.py	2007-12-28 16:51:30 +0000
@@ -350,7 +350,8 @@
 
 class TestingHTTPServer(SocketServer.TCPServer, TestingHTTPServerMixin):
 
-    def __init__(self, server_address, request_handler_class, test_case_server):
+    def __init__(self, server_address, request_handler_class,
+                 test_case_server):
         TestingHTTPServerMixin.__init__(self, test_case_server)
         SocketServer.TCPServer.__init__(self, server_address,
                                         request_handler_class)
@@ -365,7 +366,8 @@
     by spawning a new thread for each connection.
     """
 
-    def __init__(self, server_address, request_handler_class, test_case_server):
+    def __init__(self, server_address, request_handler_class,
+                 test_case_server):
         TestingHTTPServerMixin.__init__(self, test_case_server)
         SocketServer.ThreadingTCPServer.__init__(self, server_address,
                                                  request_handler_class)

=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py	2007-12-28 15:33:47 +0000
+++ b/bzrlib/tests/test_http.py	2007-12-28 16:51:30 +0000
@@ -14,10 +14,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-"""Tests for HTTP test framework and implementation neutral code.
+"""Tests for HTTP implementations.
 
-Code that need to be tested against implementations or variations of the HTTP
-protocol should go in test_http_implementations.py
+This module defines a load_tests() method that parametrize tests classes for
+transport implementation, http protocol versions and authentication schemes.
 """
 
 # TODO: Should be renamed to bzrlib.transport.http.tests?
@@ -140,7 +140,8 @@
     tpa_adapter = TransportProtocolAuthenticationAdapter()
     tpa_classes = (TestAuth,
                    )
-    is_also_testing_for_authentication = tests.condition_isinstance(tpa_classes)
+    is_also_testing_for_authentication = tests.condition_isinstance(
+        tpa_classes)
 
     result = loader.suiteClass()
     for test_class in tests.iter_suite_tests(standard_tests):
@@ -323,7 +324,8 @@
         url = http.extract_auth('http://example.com', f)
         self.assertEquals('http://example.com', url)
         self.assertEquals(0, len(f.credentials))
-        url = http.extract_auth('http://user:pass@www.bazaar-vcs.org/bzr/bzr.dev', f)
+        url = http.extract_auth(
+            'http://user:pass@www.bazaar-vcs.org/bzr/bzr.dev', f)
         self.assertEquals('http://www.bazaar-vcs.org/bzr/bzr.dev', url)
         self.assertEquals(1, len(f.credentials))
         self.assertEquals([None, 'www.bazaar-vcs.org', 'user', 'pass'],

=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py	2007-12-28 15:28:44 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py	2007-12-28 16:51:30 +0000
@@ -32,9 +32,6 @@
 handle authentication schemes.
 """
 
-# TODO: now that we have -Dhttp most of the needs should be covered in a more
-# accessible way (i.e. no need to edit the source), if experience confirms
-# that, delete all DEBUG uses -- vila20071130 (happy birthday).
 DEBUG = 0
 
 # FIXME: Oversimplifying, two kind of exceptions should be



More information about the bazaar-commits mailing list