/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-24 19:17:28 UTC
  • mto: (1946.2.8 reduce-knit-churn)
  • mto: This revision was merged to the branch mainline in revision 1988.
  • Revision ID: john@arbash-meinel.com-20060824191728-2164fd6bb3cc681f
Implement and test 'get_bytes'

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        self.assertListRaises(NoSuchFile, t.get_multi, ['a', 'b', 'c'])
112
112
        self.assertListRaises(NoSuchFile, t.get_multi, iter(['a', 'b', 'c']))
113
113
 
 
114
    def test_get_bytes(self):
 
115
        t = self.get_transport()
 
116
 
 
117
        files = ['a', 'b', 'e', 'g']
 
118
        contents = ['contents of a\n',
 
119
                    'contents of b\n',
 
120
                    'contents of e\n',
 
121
                    'contents of g\n',
 
122
                    ]
 
123
        self.build_tree(files, transport=t, line_endings='binary')
 
124
        self.check_transport_contents('contents of a\n', t, 'a')
 
125
 
 
126
        for content, fname in zip(contents, files):
 
127
            self.assertEqual(content, t.get_bytes(fname))
 
128
 
 
129
        self.assertRaises(NoSuchFile, t.get_bytes, 'c')
 
130
 
114
131
    def test_put(self):
115
132
        t = self.get_transport()
116
133