155
155
self.assertEqual(True, t.has('a'))
156
156
self.assertEqual(False, t.has('c'))
157
157
self.assertEqual(True, t.has(urlutils.escape('%')))
158
self.assertEqual(list(t.has_multi(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])),
159
[True, True, False, False, True, False, True, False])
158
self.assertEqual(list(t.has_multi(['a', 'b', 'c', 'd',
159
'e', 'f', 'g', 'h'])),
160
[True, True, False, False,
161
True, False, True, False])
160
162
self.assertEqual(True, t.has_any(['a', 'b', 'c']))
161
self.assertEqual(False, t.has_any(['c', 'd', 'f', urlutils.escape('%%')]))
162
self.assertEqual(list(t.has_multi(iter(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']))),
163
[True, True, False, False, True, False, True, False])
163
self.assertEqual(False, t.has_any(['c', 'd', 'f',
164
urlutils.escape('%%')]))
165
self.assertEqual(list(t.has_multi(iter(['a', 'b', 'c', 'd',
166
'e', 'f', 'g', 'h']))),
167
[True, True, False, False,
168
True, False, True, False])
164
169
self.assertEqual(False, t.has_any(['c', 'c', 'c']))
165
170
self.assertEqual(True, t.has_any(['b', 'b', 'b']))
1495
1500
transport.put_bytes('foo', 'bar')
1496
1501
transport3 = self.get_transport()
1497
1502
self.check_transport_contents('bar', transport3, 'foo')
1498
# its base should be usable. XXX: This is true only if we don't use
1499
# auhentication, otherwise 'base' doesn't mention the password and we
1500
# can't access it anymore since the password is lost (it *could* be
1501
# mentioned in the url given by the test server) --vila 090226
1502
transport4 = get_transport(transport.base)
1503
self.check_transport_contents('bar', transport4, 'foo')
1505
1504
# now opening at a relative url should give use a sane result:
1506
1505
transport.mkdir('newdir')
1507
transport5 = get_transport(transport.base + "newdir")
1506
transport5 = self.get_transport('newdir')
1508
1507
transport6 = transport5.clone('..')
1509
1508
self.check_transport_contents('bar', transport6, 'foo')