~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: John Arbash Meinel
  • Date: 2006-11-03 21:07:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2123.
  • Revision ID: john@arbash-meinel.com-20061103210701-47426955baa7bd9b
Fix MemoryTransport.list_dir() implementation, and update tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
        transport.append_bytes('foo', 'content')
236
236
        self.assertEquals(True, transport.has('foo'))
237
237
 
 
238
    def test_list_dir(self):
 
239
        transport = MemoryTransport()
 
240
        transport.put_bytes('foo', 'content')
 
241
        transport.mkdir('dir')
 
242
        transport.put_bytes('dir/subfoo', 'content')
 
243
        transport.put_bytes('dirlike', 'content')
 
244
 
 
245
        self.assertEquals(['dir', 'dirlike', 'foo'], sorted(transport.list_dir('.')))
 
246
        self.assertEquals(['subfoo'], sorted(transport.list_dir('dir')))
 
247
 
238
248
    def test_mkdir(self):
239
249
        transport = MemoryTransport()
240
250
        transport.mkdir('dir')