~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-01-17 17:21:14 UTC
  • mfrom: (2229.2.5 reserved-ids)
  • Revision ID: pqm@pqm.ubuntu.com-20070117172114-dc75493dad46088c
Ensure reserved ids are never stored

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
        self.assertEqual({'B':['A'],
297
297
                          'A':[]},
298
298
                         source.get_revision_graph('B'))
 
299
 
 
300
 
 
301
class TestReservedId(TestCase):
 
302
 
 
303
    def test_is_reserved_id(self):
 
304
        self.assertEqual(True, revision.is_reserved_id(NULL_REVISION))
 
305
        self.assertEqual(True, revision.is_reserved_id(
 
306
            revision.CURRENT_REVISION))
 
307
        self.assertEqual(True, revision.is_reserved_id('arch:'))
 
308
        self.assertEqual(False, revision.is_reserved_id('null'))
 
309
        self.assertEqual(False, revision.is_reserved_id(
 
310
            'arch:a@example.com/c--b--v--r'))
 
311
        self.assertEqual(False, revision.is_reserved_id(None))