~ubuntu-branches/ubuntu/precise/apport/precise

« back to all changes in this revision

Viewing changes to test/test_ui.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-03-07 14:47:31 UTC
  • mfrom: (148.1.55)
  • Revision ID: package-import@ubuntu.com-20120307144731-vnoff16v0fwhxh0h
Tags: 1.94.1-0ubuntu1
* New upstream bug fix release. Changes since our previous snapshot:
  - apport-cli: Consistently handle unicode vs. byte arrays. (LP: #946207)
  - report.py, anonymize(): Fix crash when the hostname or user name contain
    non-ASCII characters. (LP: #945230)
  - packaging-apt-dpkg.py: Fix UnicodeDecodeError on unexpected md5sum output.
    (LP: #921037)
  - apport-gtk: Fix handling of non-ASCII strings in message dialogs.
    (LP: #620579)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# coding: UTF-8
1
2
import unittest, shutil, signal, tempfile, resource, pwd, time, os, sys
2
3
import subprocess, errno, glob
3
4
 
1111
1112
        '''run_crash() anonymization'''
1112
1113
 
1113
1114
        r = self._gen_test_crash()
 
1115
        r['ProcUnicodeValue'] = u'ä %s ♥ ' % os.uname()[1]
 
1116
        r['ProcByteArrayValue'] = b'ä %s ♥ ' % os.uname()[1]
1114
1117
        report_file = os.path.join(apport.fileutils.report_dir, 'test.crash')
1115
1118
        r.write(open(report_file, 'w'))
1116
1119
        self.ui = TestSuiteUserInterface()