3
"""Tests for revision properties."""
5
from bzrlib.branch import Branch
6
from bzrlib.selftest import TestCaseInTempDir
8
class TestRevProps(TestCaseInTempDir):
9
def test_simple_revprops(self):
10
"""Simple revision properties"""
11
b = Branch.initialize('.')
12
props = dict(flavor='choc-mint',
14
b.commit(message='initial null commit',
18
rev = b.get_revision('test@user-1')
19
self.assertTrue('flavor' in rev.properties)
20
self.assertEquals(rev.properties['flavor'], 'choc-mint')
21
self.assertEquals(rev.properties['condiment'], 'chilli')
22
self.assertEquals(sorted(rev.properties.items()),
23
[('condiment', 'chilli'),
24
('flavor', 'choc-mint')])
26
# TODO: try properties with newlines and indenting
28
# TODO: property names with newlines are disallowed
30
# TODO: Can't add non-string properties
32
# TODO: Properties are retrieved correctly