~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-01-31 13:36:59 UTC
  • mfrom: (6613.1.5 1538480-match-hostname)
  • Revision ID: pqm@pqm.ubuntu.com-20160131133659-ouy92ee2wlv9xz8m
(vila) Use ssl.match_hostname instead of our own. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        register_command(cmd_echo_exact)
55
55
        try:
56
56
            self.assertEqual('foo', bzr('echo-exact foo'))
57
 
            # This is cheating a little bit, because 'foo\xb5' shouldn't
58
 
            # get past main()
59
 
            self.assertEqual('foo\xb5', bzr('echo-exact foo\xb5'))
60
57
            # Exact should fail to decode the string
61
58
            self.assertRaises(UnicodeEncodeError,
62
59
                bzr,
63
60
                ['echo-exact', u'foo\xb5'])
 
61
            # Previously a non-ascii bytestring was also tested, as 'exact'
 
62
            # outputs bytes untouched, but needed buggy argv parsing to work
64
63
        finally:
65
64
            plugin_cmds.remove('echo-exact')
66
65