298
298
self.assertEqual('memory:///path/', transport.chroot_url)
300
300
def test_append_file(self):
301
transport = get_transport('chroot+file:///foo/bar')
301
transport = get_transport('chroot+memory:///foo/bar')
302
302
self.assertRaises(PathNotChild, transport.append_file, '/foo', None)
304
304
def test_append_bytes(self):
305
transport = get_transport('chroot+file:///foo/bar')
305
transport = get_transport('chroot+memory:///foo/bar')
306
306
self.assertRaises(PathNotChild, transport.append_bytes, '/foo', 'bytes')
308
308
def test_clone(self):
309
transport = get_transport('chroot+file:///foo/bar')
309
transport = get_transport('chroot+memory:///foo/bar')
310
310
self.assertRaises(PathNotChild, transport.clone, '/foo')
312
312
def test_delete(self):
313
transport = get_transport('chroot+file:///foo/bar')
313
transport = get_transport('chroot+memory:///foo/bar')
314
314
self.assertRaises(PathNotChild, transport.delete, '/foo')
316
316
def test_delete_tree(self):
317
transport = get_transport('chroot+file:///foo/bar')
317
transport = get_transport('chroot+memory:///foo/bar')
318
318
self.assertRaises(PathNotChild, transport.delete_tree, '/foo')
320
320
def test_get(self):
321
transport = get_transport('chroot+file:///foo/bar')
321
transport = get_transport('chroot+memory:///foo/bar')
322
322
self.assertRaises(PathNotChild, transport.get, '/foo')
324
324
def test_get_bytes(self):
325
transport = get_transport('chroot+file:///foo/bar')
325
transport = get_transport('chroot+memory:///foo/bar')
326
326
self.assertRaises(PathNotChild, transport.get_bytes, '/foo')
328
328
def test_has(self):
329
transport = get_transport('chroot+file:///foo/bar')
329
transport = get_transport('chroot+memory:///foo/bar')
330
330
self.assertRaises(PathNotChild, transport.has, '/foo')
332
332
def test_list_dir(self):
333
transport = get_transport('chroot+file:///foo/bar')
333
transport = get_transport('chroot+memory:///foo/bar')
334
334
self.assertRaises(PathNotChild, transport.list_dir, '/foo')
336
336
def test_lock_read(self):
337
transport = get_transport('chroot+file:///foo/bar')
337
transport = get_transport('chroot+memory:///foo/bar')
338
338
self.assertRaises(PathNotChild, transport.lock_read, '/foo')
340
340
def test_lock_write(self):
341
transport = get_transport('chroot+file:///foo/bar')
341
transport = get_transport('chroot+memory:///foo/bar')
342
342
self.assertRaises(PathNotChild, transport.lock_write, '/foo')
344
344
def test_mkdir(self):
345
transport = get_transport('chroot+file:///foo/bar')
345
transport = get_transport('chroot+memory:///foo/bar')
346
346
self.assertRaises(PathNotChild, transport.mkdir, '/foo')
348
348
def test_put_bytes(self):
349
transport = get_transport('chroot+file:///foo/bar')
349
transport = get_transport('chroot+memory:///foo/bar')
350
350
self.assertRaises(PathNotChild, transport.put_bytes, '/foo', 'bytes')
352
352
def test_put_file(self):
353
transport = get_transport('chroot+file:///foo/bar')
353
transport = get_transport('chroot+memory:///foo/bar')
354
354
self.assertRaises(PathNotChild, transport.put_file, '/foo', None)
356
356
def test_rename(self):
357
transport = get_transport('chroot+file:///foo/bar')
357
transport = get_transport('chroot+memory:///foo/bar')
358
358
self.assertRaises(PathNotChild, transport.rename, '/aaa', 'bbb')
359
359
self.assertRaises(PathNotChild, transport.rename, 'ccc', '/d')
361
361
def test_rmdir(self):
362
transport = get_transport('chroot+file:///foo/bar')
362
transport = get_transport('chroot+memory:///foo/bar')
363
363
self.assertRaises(PathNotChild, transport.rmdir, '/foo')
365
365
def test_stat(self):
366
transport = get_transport('chroot+file:///foo/bar')
366
transport = get_transport('chroot+memory:///foo/bar')
367
367
self.assertRaises(PathNotChild, transport.stat, '/foo')
370
370
class ReadonlyDecoratorTransportTest(TestCase):
371
371
"""Readonly decoration specific tests."""