libreport/0001-tests-Don-t-use-deprecated-assertEquals.patch
2022-01-13 13:00:47 +01:00

50 lines
1.6 KiB
Diff

From 976d3ffcee73a5d832cb757f2dc39aea21abd2f2 Mon Sep 17 00:00:00 2001
From: Michal Fabik <mfabik@redhat.com>
Date: Thu, 4 Nov 2021 22:14:08 +0100
Subject: [PATCH] tests: Don't use deprecated assertEquals
unittest.assertEquals was deprecated in Python 3.2 and will no longer be
supported in 3.11
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=2019402
---
tests/client_python.at | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/client_python.at b/tests/client_python.at
index d026ed70..75ec1890 100644
--- a/tests/client_python.at
+++ b/tests/client_python.at
@@ -35,22 +35,22 @@ class TestReportClientVerbose(unittest.TestCase):
del sys.modules["reportclient"]
def test_default(self):
- self.assertEquals(self.reportclient.verbose, 0)
+ self.assertEqual(self.reportclient.verbose, 0)
def test_assign(self):
self.reportclient.set_verbosity(1)
- self.assertEquals(self.reportclient.verbose, 1)
- self.assertEquals(os.environ["ABRT_VERBOSE"], "1")
+ self.assertEqual(self.reportclient.verbose, 1)
+ self.assertEqual(os.environ["ABRT_VERBOSE"], "1")
def test_load_from_environ(self):
os.environ["ABRT_VERBOSE"] = "2"
reload(self.reportclient)
- self.assertEquals(self.reportclient.verbose, 2)
+ self.assertEqual(self.reportclient.verbose, 2)
def test_recover_from_invalid_environ(self):
os.environ["ABRT_VERBOSE"] = "foo"
reload(self.reportclient)
- self.assertEquals(self.reportclient.verbose, 0)
+ self.assertEqual(self.reportclient.verbose, 0)
if __name__ == "__main__":
--
2.31.1