~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Patch Queue Manager
  • Date: 2012-03-14 14:39:16 UTC
  • mfrom: (6027.1.18 deprecations)
  • Revision ID: pqm@pqm.ubuntu.com-20120314143916-dggf9d1d26j3kizq
(vila) Remove some code deprecated in series older than 2.4 (inclusive)
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2410
2410
        self.assertEqual('tree', revision.properties['branch-nick'])
2411
2411
 
2412
2412
 
2413
 
class TestBackupName(tests.TestCase):
2414
 
 
2415
 
    def test_deprecations(self):
2416
 
        class MockTransform(object):
2417
 
 
2418
 
            def has_named_child(self, by_parent, parent_id, name):
2419
 
                return name in by_parent.get(parent_id, [])
2420
 
 
2421
 
        class MockEntry(object):
2422
 
 
2423
 
            def __init__(self):
2424
 
                object.__init__(self)
2425
 
                self.name = "name"
2426
 
 
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)
2436
 
 
2437
 
 
2438
2413
class TestFileMover(tests.TestCaseWithTransport):
2439
2414
 
2440
2415
    def test_file_mover(self):