From dad654010a030f1038bd2df95a9647fb417e0447 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Mon, 2 Aug 2021 17:11:20 +0800 Subject: [PATCH] Fix warnings about assertEquals Example: ``` pyu2f/tests/hid/macos_test.py::MacOsTest::testInitHidDevice /build/python-pyu2f/src/pyu2f-0.1.5/pyu2f/tests/hid/macos_test.py:61: DeprecationWarning: Please use assertEqual instead. self.assertEquals(64, device.GetOutReportDataLength()) ``` --- pyu2f/tests/customauthenticator_test.py | 48 ++++++------ pyu2f/tests/hardware_test.py | 56 ++++++------- pyu2f/tests/hid/linux_test.py | 24 +++--- pyu2f/tests/hid/macos_test.py | 18 ++--- pyu2f/tests/hidtransport_test.py | 44 +++++------ pyu2f/tests/localauthenticator_test.py | 34 ++++---- pyu2f/tests/model_test.py | 16 ++-- pyu2f/tests/u2f_test.py | 100 ++++++++++++------------ pyu2f/tests/util_test.py | 12 +-- 9 files changed, 176 insertions(+), 176 deletions(-) Index: pyu2f-0.1.5a/pyu2f/tests/customauthenticator_test.py =================================================================== --- pyu2f-0.1.5a.orig/pyu2f/tests/customauthenticator_test.py +++ pyu2f-0.1.5a/pyu2f/tests/customauthenticator_test.py @@ -122,44 +122,44 @@ class CustomAuthenticatorTest(unittest.T self.assertTrue(mock_communicate_method.called) communicate_args = mock_communicate_method.call_args[0] - self.assertEquals(len(communicate_args), 1, - 'communicate() should have been called with two args') + self.assertEqual(len(communicate_args), 1, + 'communicate() should have been called with two args') communicate_stdin = communicate_args[0] communicate_json_len_le = communicate_stdin[:4] communicate_json_len = struct.unpack('