/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/brokenrename.py

  • Committer: Vincent Ladeuil
  • Date: 2009-02-25 19:24:44 UTC
  • mto: (4055.1.1 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 4057.
  • Revision ID: v.ladeuil+lp@free.fr-20090225192444-az73q3t73x8ti6bi
Ensures all auth handlers correctly parse all auth headers.

* bzrlib/tests/test_http.py:
(TestAuthHeader): Test for all known auth schemes.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler._parse_auth_header): All handlers should be
able to parse any header, they may as well share the
implementation.
(NegotiateAuthHandler.auth_match, BasicAuthHandler.auth_match,
DigestAuthHandler.auth_match): JFDI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Transport implementation that doesn't detect clashing renames.
18
18
"""
23
23
        errors,
24
24
        urlutils,
25
25
        )
26
 
from bzrlib.transport import decorator
27
 
 
28
 
 
29
 
class BrokenRenameTransportDecorator(decorator.TransportDecorator):
 
26
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
 
27
 
 
28
 
 
29
class BrokenRenameTransportDecorator(TransportDecorator):
30
30
    """A transport that fails to detect clashing renames"""
31
31
 
32
32
    @classmethod
46
46
            return
47
47
 
48
48
 
 
49
class BrokenRenameServer(DecoratorServer):
 
50
    """Server for the BrokenRenameTransportDecorator for testing with."""
 
51
 
 
52
    def get_decorator_class(self):
 
53
        return BrokenRenameTransportDecorator
 
54
 
 
55
 
49
56
def get_test_permutations():
50
57
    """Return the permutations to be used in testing."""
51
58
    # we don't use this for general testing, only for the tests that