/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 bzrlib/tests/test_generate_ids.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-12 20:26:05 UTC
  • mto: (5853.1.2 trunk) (5609.38.1 2.3)
  • mto: This revision was merged to the branch mainline in revision 5861.
  • Revision ID: v.ladeuil+lp@free.fr-20110512202605-whwfrkgddrxv1exm
Backport fix for deprecated test methods (failIf, failUnless, etc)

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        # Test both case squashing and length restriction
63
63
        fid = gen_file_id('A'*50 + '.txt')
64
64
        self.assertStartsWith(fid, 'a'*20 + '-')
65
 
        self.failUnless(len(fid) < 60)
 
65
        self.assertTrue(len(fid) < 60)
66
66
 
67
67
        # restricting length happens after the other actions, so
68
68
        # we preserve as much as possible
69
69
        fid = gen_file_id('\xe5\xb5..aBcd\tefGhijKLMnop\tqrstuvwxyz')
70
70
        self.assertStartsWith(fid, 'abcdefghijklmnopqrst-')
71
 
        self.failUnless(len(fid) < 60)
 
71
        self.assertTrue(len(fid) < 60)
72
72
 
73
73
    def test_file_ids_are_ascii(self):
74
74
        tail = r'-\d{14}-[a-z0-9]{16}-\d+'