2
# -*- coding: utf-8 -*-
3
# Copyright (C) 2011 Michael Vogt <mvo@ubuntu.com>
5
# Licensed under the GNU General Public License Version 2
7
# This program is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 2 of the License, or
10
# at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
# Licensed under the GNU General Public License Version 2
22
"""Regression test for a unicode decoding error in the status_details,
23
progress_download or error_properties attributes of the transaction,
27
__author__ = "Michael Vogt <mvo@glatzor.de>"
31
from aptdaemon.errors import TransactionFailed
32
from aptdaemon.test import AptDaemonTestCase
35
class TestUnicodeDecodingPy3(AptDaemonTestCase):
37
def test_dbus_exception_lp846044(self):
38
e = TransactionFailed("foo", "bar")
40
self.assertEqual(str(e), "Transaction failed: None\nä")
43
if __name__ == "__main__":