aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unittests/cleaner_tests.py
diff options
context:
space:
mode:
authorMartin Pitt <mpitt@debian.org>2024-01-10 07:59:37 +0100
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-01-10 19:51:26 -0500
commit769768aabcae3d0265332ee72e9df94d1001f14c (patch)
treea9dac456ad876fae21f1ba4ce5c580257b131e0c /tests/unittests/cleaner_tests.py
parent68aef93482543e68bfe92966a853cf5c1d7ea12e (diff)
downloadsos-769768aabcae3d0265332ee72e9df94d1001f14c.tar.gz
[tests] Drop obsolete TestCase.assertEquals()
`unittest.TestCase.assertEquals()` was deprecated in Python 3 [1], and finally dropped in Python 3.12. This now causes the unit tests to fail [2]. [1] https://docs.python.org/3.5/library/unittest.html#deprecated-aliases [2] https://bugs.debian.org/1058214 Signed-off-by: Martin Pitt <mpitt@debian.org>
Diffstat (limited to 'tests/unittests/cleaner_tests.py')
-rw-r--r--tests/unittests/cleaner_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unittests/cleaner_tests.py b/tests/unittests/cleaner_tests.py
index 8bf1b239..ca5231a7 100644
--- a/tests/unittests/cleaner_tests.py
+++ b/tests/unittests/cleaner_tests.py
@@ -50,12 +50,12 @@ class CleanerMapTests(unittest.TestCase):
def test_mac_map_skip_ignores(self):
_test = self.mac_map.get('ff:ff:ff:ff:ff:ff')
- self.assertEquals(_test, 'ff:ff:ff:ff:ff:ff')
+ self.assertEqual(_test, 'ff:ff:ff:ff:ff:ff')
def test_mac_map_avoid_duplicate_obfuscation(self):
_test = self.mac_map.get('ab:cd:ef:fe:dc:ba')
_dup = self.mac_map.get(_test)
- self.assertEquals(_test, _dup)
+ self.assertEqual(_test, _dup)
def test_ip_map_obfuscate_v4_with_cidr(self):
_test = self.ip_map.get('192.168.1.0/24')
@@ -77,7 +77,7 @@ class CleanerMapTests(unittest.TestCase):
def test_ip_skip_ignores(self):
_test = self.ip_map.get('127.0.0.1')
- self.assertEquals(_test, '127.0.0.1')
+ self.assertEqual(_test, '127.0.0.1')
def test_hostname_obfuscate_domain_options(self):
_test = self.host_map.get('www.redhat.com')