/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_email_message.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:39:02 UTC
  • mfrom: (6613.2.1 fix-gpl)
  • Revision ID: pqm@pqm.ubuntu.com-20160421043902-skyc5cmuqnh1b9la
(richard-wilbur) Update COPYING.txt from the original
 http://www.gnu.org/licenses/gpl-2.0.txt (Only differences were in
 whitespace.) Thanks to Petr Stodulka for pointing out the discrepancy.
 (Richard Wilbur)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007, 2009, 2011, 2014, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
187
187
 
188
188
        address = u'Pepe P\xe9rez <pperez@ejemplo.com>' # unicode ok
189
189
        encoded = EmailMessage.address_to_encoded_header(address)
190
 
        self.assert_('pperez@ejemplo.com' in encoded) # addr must be unencoded
191
 
        self.assertEquals(address, decode(encoded))
 
190
        self.assertTrue('pperez@ejemplo.com' in encoded) # addr must be unencoded
 
191
        self.assertEqual(address, decode(encoded))
192
192
 
193
193
        address = 'Pepe P\xc3\xa9red <pperez@ejemplo.com>' # UTF-8 ok
194
194
        encoded = EmailMessage.address_to_encoded_header(address)
195
 
        self.assert_('pperez@ejemplo.com' in encoded)
196
 
        self.assertEquals(address, decode(encoded).encode('utf-8'))
 
195
        self.assertTrue('pperez@ejemplo.com' in encoded)
 
196
        self.assertEqual(address, decode(encoded).encode('utf-8'))
197
197
 
198
198
        address = 'Pepe P\xe9rez <pperez@ejemplo.com>' # ISO-8859-1 not ok
199
199
        self.assertRaises(BzrBadParameterNotUnicode,