2410
2410
self.assertEqual('tree', revision.properties['branch-nick'])
2413
class TestBackupName(tests.TestCase):
2415
def test_deprecations(self):
2416
class MockTransform(object):
2418
def has_named_child(self, by_parent, parent_id, name):
2419
return name in by_parent.get(parent_id, [])
2421
class MockEntry(object):
2424
object.__init__(self)
2427
tt = MockTransform()
2428
name1 = self.applyDeprecated(
2429
symbol_versioning.deprecated_in((2, 3, 0)),
2430
transform.get_backup_name, MockEntry(), {'a':[]}, 'a', tt)
2431
self.assertEqual('name.~1~', name1)
2432
name2 = self.applyDeprecated(
2433
symbol_versioning.deprecated_in((2, 3, 0)),
2434
transform._get_backup_name, 'name', {'a':['name.~1~']}, 'a', tt)
2435
self.assertEqual('name.~2~', name2)
2438
2413
class TestFileMover(tests.TestCaseWithTransport):
2440
2415
def test_file_mover(self):