~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_store.py

merge permissions branch, also fixup tests so they are lined up with bzr.dev to help prevent conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        self.assertEqual(store.total_size(), (2, 55))
93
93
        
94
94
    def test__relpath_suffixed(self):
95
 
        my_store = TextStore(MockTransport(), True, compressed=True)
 
95
        my_store = TextStore(MockTransport(),
 
96
                             prefixed=True, compressed=True)
96
97
        my_store.register_suffix('dsc')
97
98
        self.assertEqual('45/foo.dsc', my_store._relpath('foo', ['dsc']))
98
99
 
357
358
                         my_store.get('missing', 'sig').read())
358
359
 
359
360
    def test___iter__no_suffix(self):
360
 
        my_store = TextStore(MemoryTransport(), False, compressed=False)
 
361
        my_store = TextStore(MemoryTransport(),
 
362
                             prefixed=False, compressed=False)
361
363
        stream = StringIO("content")
362
364
        my_store.add(stream, "foo")
363
365
        self.assertEqual(set(['foo']),
382
384
 
383
385
    def test_copy_suffixes(self):
384
386
        from_store = self.get_populated_store()
385
 
        to_store = TextStore(MemoryTransport(), True, compressed=True)
 
387
        to_store = TextStore(MemoryTransport(),
 
388
                             prefixed=True, compressed=True)
386
389
        to_store.register_suffix('sig')
387
390
        copy_all(from_store, to_store)
388
391
        self.assertEqual(1, len(to_store))