/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/tests/test_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-20 07:58:14 UTC
  • mfrom: (4547.2.4 bundle-typo)
  • Revision ID: pqm@pqm.ubuntu.com-20090720075814-ft956w3a10qwaygk
(andrew) Fix NameError when handling redirection loops in
        read_mergeable_from_transport.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1612
1612
        self.assertRaises(errors.NotABundle, read_mergeable_from_url,
1613
1613
                          'foo:bar')
1614
1614
 
 
1615
    def test_infinite_redirects_are_not_a_bundle(self):
 
1616
        """If a URL causes TooManyRedirections then NotABundle is raised.
 
1617
        """
 
1618
        from bzrlib.tests.blackbox.test_push import RedirectingMemoryServer
 
1619
        server = RedirectingMemoryServer()
 
1620
        server.setUp()
 
1621
        url = server.get_url() + 'infinite-loop'
 
1622
        self.addCleanup(server.tearDown)
 
1623
        self.assertRaises(errors.NotABundle, read_mergeable_from_url, url)
 
1624
 
1615
1625
    def test_smart_server_connection_reset(self):
1616
1626
        """If a smart server connection fails during the attempt to read a
1617
1627
        bundle, then the ConnectionReset error should be propagated.