~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_testament.py

  • Committer: Patch Queue Manager
  • Date: 2013-02-07 09:25:16 UTC
  • mfrom: (6572.1.2 bug-1107464)
  • Revision ID: pqm@pqm.ubuntu.com-20130207092516-eax0tqbckd3oiaw8
(jameinel) Fix bug #1107464,
 to allow the test suite to pass when python-apport is installed. (Dylan
 McCall)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Blackbox tests for the 'bzr testament' command"""
18
18
 
 
19
import re
19
20
 
20
21
from bzrlib.tests.test_testament import (
 
22
    osutils,
21
23
    REV_1_SHORT,
22
24
    REV_1_SHORT_STRICT,
23
25
    REV_2_TESTAMENT,
46
48
        self.assertEqualDiff(err, '')
47
49
        self.assertEqualDiff(out, REV_1_SHORT_STRICT)
48
50
 
 
51
    def test_testament_non_ascii(self):
 
52
        self.wt.commit(u"Non \xe5ssci message")
 
53
        long_out, err = self.run_bzr('testament --long')
 
54
        self.assertEqualDiff(err, '')
 
55
        short_out, err = self.run_bzr('testament')
 
56
        self.assertEqualDiff(err, '')
 
57
        sha1_re = re.compile('sha1: (?P<sha1>[a-f0-9]+)$', re.M)
 
58
        sha1 = sha1_re.search(short_out).group('sha1')
 
59
        self.assertEqual(sha1, osutils.sha_string(long_out))