~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Martin Pool
  • Date: 2006-04-12 04:45:32 UTC
  • mfrom: (1608.2.13 bzr.mbp.escape-stores)
  • mto: This revision was merged to the branch mainline in revision 1657.
  • Revision ID: mbp@sourcefrog.net-20060412044532-fc8c5c9408aae88b
[merge][wip] Storage escaping

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
                          transport.rename, 'from', 'to')
276
276
 
277
277
 
 
278
class FakeVFATDecoratorTests(TestCaseInTempDir):
 
279
    """Tests for simulation of VFAT restrictions"""
 
280
 
 
281
    def get_vfat_transport(self, url):
 
282
        """Return vfat-backed transport for test directory"""
 
283
        from bzrlib.transport.fakevfat import FakeVFATTransportDecorator
 
284
        return FakeVFATTransportDecorator('vfat+' + url)
 
285
 
 
286
    def test_transport_creation(self):
 
287
        from bzrlib.transport.fakevfat import FakeVFATTransportDecorator
 
288
        transport = self.get_vfat_transport('.')
 
289
        self.assertIsInstance(transport, FakeVFATTransportDecorator)
 
290
 
 
291
    def test_transport_mkdir(self):
 
292
        transport = self.get_vfat_transport('.')
 
293
        transport.mkdir('HELLO')
 
294
        self.assertTrue(transport.has('hello'))
 
295
        self.assertTrue(transport.has('Hello'))
 
296
 
 
297
    def test_forbidden_chars(self):
 
298
        transport = self.get_vfat_transport('.')
 
299
        self.assertRaises(ValueError, transport.has, "<NU>")
 
300
 
 
301
 
 
302
 
278
303
class BadTransportHandler(Transport):
279
304
    def __init__(self, base_url):
280
305
        raise DependencyNotPresent('some_lib', 'testing missing dependency')