~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
    def test_parameters(self):
299
299
        transport = MemoryTransport()
300
300
        self.assertEqual(True, transport.listable())
301
 
        self.assertEqual(False, transport.should_cache())
302
301
        self.assertEqual(False, transport.is_readonly())
303
302
 
304
303
    def test_iter_files_recursive(self):
414
413
        # connect to . in readonly mode
415
414
        transport = readonly.ReadonlyTransportDecorator('readonly+.')
416
415
        self.assertEqual(True, transport.listable())
417
 
        self.assertEqual(False, transport.should_cache())
418
416
        self.assertEqual(True, transport.is_readonly())
419
417
 
420
418
    def test_http_parameters(self):
428
426
            self.failUnless(isinstance(transport,
429
427
                                       readonly.ReadonlyTransportDecorator))
430
428
            self.assertEqual(False, transport.listable())
431
 
            self.assertEqual(True, transport.should_cache())
432
429
            self.assertEqual(True, transport.is_readonly())
433
430
        finally:
434
431
            server.tearDown()
443
440
        return fakenfs.FakeNFSTransportDecorator('fakenfs+' + url)
444
441
 
445
442
    def test_local_parameters(self):
446
 
        # the listable, should_cache and is_readonly parameters
 
443
        # the listable and is_readonly parameters
447
444
        # are not changed by the fakenfs decorator
448
445
        transport = self.get_nfs_transport('.')
449
446
        self.assertEqual(True, transport.listable())
450
 
        self.assertEqual(False, transport.should_cache())
451
447
        self.assertEqual(False, transport.is_readonly())
452
448
 
453
449
    def test_http_parameters(self):
454
 
        # the listable, should_cache and is_readonly parameters
 
450
        # the listable and is_readonly parameters
455
451
        # are not changed by the fakenfs decorator
456
452
        from bzrlib.tests.HttpServer import HttpServer
457
453
        # connect to . via http which is not listable
462
458
            self.assertIsInstance(
463
459
                transport, bzrlib.transport.fakenfs.FakeNFSTransportDecorator)
464
460
            self.assertEqual(False, transport.listable())
465
 
            self.assertEqual(True, transport.should_cache())
466
461
            self.assertEqual(True, transport.is_readonly())
467
462
        finally:
468
463
            server.tearDown()