diff options
author | André Apitzsch <git@apitzsch.eu> | 2017-09-10 13:21:10 +0300 |
---|---|---|
committer | André Apitzsch <git@apitzsch.eu> | 2017-09-10 13:21:10 +0300 |
commit | 3c31574cf967dd7b01b86884bd821589e693d371 (patch) | |
tree | d8f51d9a9cc594a94df69e8543fdfae31a960ef1 /test/integration | |
parent | f569084b2da324b928720ba40029e187adeacdb2 (diff) |
Unittest: replace deprecated functions
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/test_gui_event_integration.py | 2 | ||||
-rw-r--r-- | test/integration/test_roster.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/integration/test_gui_event_integration.py b/test/integration/test_gui_event_integration.py index f7600d8ce..150f2102a 100644 --- a/test/integration/test_gui_event_integration.py +++ b/test/integration/test_gui_event_integration.py @@ -101,7 +101,7 @@ class TestStatusChange(unittest.TestCase): break if not still_exists: - self.assert_(contact is None) + self.assertTrue(contact is None) return self.assertEqual('offline', contact.show) diff --git a/test/integration/test_roster.py b/test/integration/test_roster.py index 8c0e322de..3b5859d65 100644 --- a/test/integration/test_roster.py +++ b/test/integration/test_roster.py @@ -74,13 +74,13 @@ class TestRosterWindow(unittest.TestCase): c_model = self.roster.model[titerC] # name can be stricked if contact or group is blocked -# self.assertEquals(contact.get_shown_name(), c_model[self.C_NAME], +# self.assertEqual(contact.get_shown_name(), c_model[self.C_NAME], # msg='Contact name missmatch') - self.assertEquals(contact.jid, c_model[self.C_JID], + self.assertEqual(contact.jid, c_model[self.C_JID], msg='Jid missmatch') if not self.roster.regroup: - self.assertEquals(account, c_model[self.C_ACCOUNT], + self.assertEqual(account, c_model[self.C_ACCOUNT], msg='Account missmatch') # Check for correct nesting @@ -111,15 +111,15 @@ class TestRosterWindow(unittest.TestCase): msg='Account iter is invalid') acc_model = self.roster.model[titerA] - self.assertEquals(acc_model[self.C_TYPE], 'account', + self.assertEqual(acc_model[self.C_TYPE], 'account', msg='No account found') if not self.roster.regroup: - self.assertEquals(acc_model[self.C_ACCOUNT], acc, + self.assertEqual(acc_model[self.C_ACCOUNT], acc, msg='Account not found') self_jid = app.get_jid_from_account(acc) - self.assertEquals(acc_model[self.C_JID], self_jid, + self.assertEqual(acc_model[self.C_JID], self_jid, msg='Account JID not found in account row') def assert_model_is_in_sync(self): @@ -139,7 +139,7 @@ class TestRosterWindow(unittest.TestCase): # Contacts kept their info contact = instances[0] - self.assertEquals(sorted(contact.groups), sorted(contacts[acc][jid]['groups']), + self.assertEqual(sorted(contact.groups), sorted(contacts[acc][jid]['groups']), msg='Group Missmatch') groups = contacts[acc][jid]['groups'] or ['General',] |