275
275
transport.rename, 'from', 'to')
278
class FakeVFATDecoratorTests(TestCaseInTempDir):
279
"""Tests for simulation of VFAT restrictions"""
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)
286
def test_transport_creation(self):
287
from bzrlib.transport.fakevfat import FakeVFATTransportDecorator
288
transport = self.get_vfat_transport('.')
289
self.assertIsInstance(transport, FakeVFATTransportDecorator)
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'))
297
def test_forbidden_chars(self):
298
transport = self.get_vfat_transport('.')
299
self.assertRaises(ValueError, transport.has, "<NU>")
278
302
class BadTransportHandler(Transport):
279
303
def __init__(self, base_url):
280
304
raise DependencyNotPresent('some_lib', 'testing missing dependency')