summaryrefslogtreecommitdiff
path: root/sys-apps/accountsservice/files/accountsservice-23.13.9-test-fix.patch
blob: a0f8346ce802032da5a512f8403bee09901f2f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/ad0365b77b583da06bcd1e8da4c1bed74129895a

From ad0365b77b583da06bcd1e8da4c1bed74129895a Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 28 Sep 2023 09:29:07 -0400
Subject: [PATCH] tests: s/assertEquals/assertEqual/

CI is currently failing with:

Traceback (most recent call last):
  File "/home/user/accountsservice/_build/../tests/test-libaccountsservice.py", line 118, in test_multiple_inflight_get_user_by_id_calls
    self.assertEquals(user.get_user_name(), 'pizza')
    ^^^^^^^^^^^^^^^^^
AttributeError: 'TestAccountsServicePreExistingUser' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

I have no idea if assertEquals was dropped, or if CI has been failing
all this time or what.

This commit makes the suggested change.
---
 tests/test-libaccountsservice.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test-libaccountsservice.py b/tests/test-libaccountsservice.py
index f0261b1..f2fcbc2 100644
--- a/tests/test-libaccountsservice.py
+++ b/tests/test-libaccountsservice.py
@@ -115,8 +115,8 @@ class TestAccountsServicePreExistingUser(AccountsServiceTestBase):
             self.assertTrue(user_objects[instance].is_loaded())
 
         for user in user_objects:
-            self.assertEquals(user.get_user_name(), 'pizza')
-            self.assertEquals(user.get_uid(), 2001)
+            self.assertEqual(user.get_user_name(), 'pizza')
+            self.assertEqual(user.get_uid(), 2001)
 
 @unittest.skipUnless(have_accounts_service,
                      'AccountsService gi introspection not available')
-- 
GitLab