~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: Martin Pool
  • Date: 2005-07-04 07:34:10 UTC
  • Revision ID: mbp@sourcefrog.net-20050704073408-faed1ea9d8b586d4
- Test case for validate_revision_id

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
                          ['hello.txt'])
20
20
 
21
21
 
 
22
 
 
23
class ValidateRevisionId(TestBase):
 
24
    def runTest(self):
 
25
        from bzrlib.revision import validate_revision_id
 
26
        validate_revision_id('mbp@sourcefrog.net-20050311061123-96a255005c7c9dbe')
 
27
        
 
28
        self.assertRaises(ValueError,
 
29
                          validate_revision_id,
 
30
                          ' asdkjas')
 
31
 
 
32
 
 
33
        self.assertRaises(ValueError,
 
34
                          validate_revision_id,
 
35
                          'mbp@sourcefrog.net-20050311061123-96a255005c7c9dbe\n')
 
36
 
 
37
 
 
38
        self.assertRaises(ValueError,
 
39
                          validate_revision_id,
 
40
                          ' mbp@sourcefrog.net-20050311061123-96a255005c7c9dbe')
 
41
 
 
42
        self.assertRaises(ValueError,
 
43
                          validate_revision_id,
 
44
                          'Martin Pool <mbp@sourcefrog.net>-20050311061123-96a255005c7c9dbe')
 
45
 
 
46
 
 
47
 
22
48
class Revert(InTempDir):
23
49
    """Test selected-file revert"""
24
50
    def runTest(self):