/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 breezy/tests/test_index.py

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    tests,
22
22
    transport,
23
23
    )
 
24
from ..sixish import int2byte
24
25
from ..bzr import (
25
26
    index as _mod_index,
26
27
    )
308
309
        builder = _mod_index.GraphIndexBuilder()
309
310
        for bad_char in bytearray(b'\t\n\x0b\x0c\r\x00 '):
310
311
            self.assertRaises(_mod_index.BadIndexKey, builder.add_node,
311
 
                              (b'a%skey' % bytes([bad_char]), ), b'data')
 
312
                              (b'a%skey' % int2byte(bad_char), ), b'data')
312
313
        self.assertRaises(_mod_index.BadIndexKey, builder.add_node,
313
314
                          (), b'data')
314
315
        self.assertRaises(_mod_index.BadIndexKey, builder.add_node,
323
324
        builder = _mod_index.GraphIndexBuilder(key_elements=2)
324
325
        for bad_char in bytearray(b'\t\n\x0b\x0c\r\x00 '):
325
326
            self.assertRaises(_mod_index.BadIndexKey, builder.add_node,
326
 
                              (b'prefix', b'a%skey' % bytes([bad_char])), b'data')
 
327
                              (b'prefix', b'a%skey' % int2byte(bad_char)), b'data')
327
328
 
328
329
    def test_add_node_bad_data(self):
329
330
        builder = _mod_index.GraphIndexBuilder()