diff --git a/src/common/contacts.py b/src/common/contacts.py index a3b387d8d..33a66dd7b 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -238,7 +238,7 @@ class LegacyContactsAPI: self._metacontact_manager.add_account(account_name) def get_accounts(self): - return self._accounts.keys() + return list(self._accounts.keys()) def remove_account(self, account): del self._accounts[account] diff --git a/test/integration/test_roster.py b/test/integration/test_roster.py index 5b81f5824..d81df5dd9 100644 --- a/test/integration/test_roster.py +++ b/test/integration/test_roster.py @@ -139,7 +139,7 @@ class TestRosterWindow(unittest.TestCase): # Contacts kept their info contact = instances[0] - self.assertEquals(contact.groups, contacts[acc][jid]['groups'], + self.assertEquals(sorted(contact.groups), sorted(contacts[acc][jid]['groups']), msg='Group Missmatch') groups = contacts[acc][jid]['groups'] or ['General',] diff --git a/test/lib/__init__.py b/test/lib/__init__.py index a005c1b93..e941e220a 100644 --- a/test/lib/__init__.py +++ b/test/lib/__init__.py @@ -23,8 +23,8 @@ configdir = gajim_root + '/test/tmp' pluginsconfigdir = configdir + '/pluginsconfig' # define _ for i18n -import __builtin__ -__builtin__._ = lambda x: x +import builtins +builtins._ = lambda x: x def setup_env(): # wipe config directory diff --git a/test/runtests.py b/test/runtests.py index 128814780..0d67e2182 100755 --- a/test/runtests.py +++ b/test/runtests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 '''