~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/teststore.py

  • Committer: Robert Collins
  • Date: 2005-10-16 07:11:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051016071129-d0cd8a663a42cea0
teach TransportStore.add to accept an optional file suffix, which does not alter the fileid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
        my_store = InstrumentedTransportStore(MockTransport(), True)
310
310
        my_store.add(stream, "foo")
311
311
        self.assertEqual([("_add", "45/foo", stream)], my_store._calls)
 
312
 
 
313
    def test_add_simple_suffixed(self):
 
314
        stream = StringIO("content")
 
315
        my_store = InstrumentedTransportStore(MockTransport())
 
316
        my_store.add(stream, "foo", 'dsc')
 
317
        self.assertEqual([("_add", "foo.dsc", stream)], my_store._calls)
 
318
        
 
319
    def test_add_simple_suffixed(self):
 
320
        stream = StringIO("content")
 
321
        my_store = InstrumentedTransportStore(MockTransport(), True)
 
322
        my_store.add(stream, "foo", 'dsc')
 
323
        self.assertEqual([("_add", "45/foo.dsc", stream)], my_store._calls)
 
324