~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: Alexander Belchenko
  • Date: 2007-10-04 05:50:44 UTC
  • mfrom: (2881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2884.
  • Revision ID: bialix@ukr.net-20071004055044-pb88kgkfayawro8n
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
                    t.put_file, 'a', StringIO('some text for a\n'))
375
375
            return
376
376
 
377
 
        t.put_file('a', StringIO('some text for a\n'))
 
377
        result = t.put_file('a', StringIO('some text for a\n'))
 
378
        # put_file returns the length of the data written
 
379
        self.assertEqual(16, result)
378
380
        self.failUnless(t.has('a'))
379
381
        self.check_transport_contents('some text for a\n', t, 'a')
380
382
        # Put also replaces contents
381
 
        t.put_file('a', StringIO('new\ncontents for\na\n'))
 
383
        result = t.put_file('a', StringIO('new\ncontents for\na\n'))
 
384
        self.assertEqual(19, result)
382
385
        self.check_transport_contents('new\ncontents for\na\n', t, 'a')
383
386
        self.assertRaises(NoSuchFile,
384
387
                          t.put_file, 'path/doesnt/exist/c',