pylint: Replace deprecated assertEquals with assertEqual

pylint complain:
  Using deprecated method assertEquals() (deprecated-method)

https://docs.python.org/3.3/library/unittest.html#deprecated-aliases
Method Name     Deprecated alias        Deprecated alias
assertEqual()   failUnlessEqual         assertEquals

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
This commit is contained in:
Chen Hanxiao 2017-10-21 12:36:44 +08:00 committed by Chen Hanxiao
parent 10246e0caa
commit 4897615a1e
1 changed files with 5 additions and 5 deletions

View File

@ -32,23 +32,23 @@ class TestHostkeymap(unittest.TestCase):
return open(os.path.join(os.getcwd(), return open(os.path.join(os.getcwd(),
"tests/hostkeymap", filename)) "tests/hostkeymap", filename))
self.assertEquals( self.assertEqual(
hostkeymap._sysconfig_keyboard( hostkeymap._sysconfig_keyboard(
_open("sysconfig-comments.txt")), _open("sysconfig-comments.txt")),
"") "")
self.assertEquals( self.assertEqual(
hostkeymap._sysconfig_keyboard( hostkeymap._sysconfig_keyboard(
_open("sysconfig-rhel5.txt")), _open("sysconfig-rhel5.txt")),
"us") "us")
self.assertEquals( self.assertEqual(
hostkeymap._find_xkblayout( hostkeymap._find_xkblayout(
_open("default-keyboard-debian9.txt")), _open("default-keyboard-debian9.txt")),
"us") "us")
self.assertEquals( self.assertEqual(
hostkeymap._find_xkblayout( hostkeymap._find_xkblayout(
_open("console-setup-debian9.txt")), _open("console-setup-debian9.txt")),
None) None)
self.assertEquals( self.assertEqual(
hostkeymap._xorg_keymap( hostkeymap._xorg_keymap(
_open("xorg-rhel5.txt")), _open("xorg-rhel5.txt")),
"us") "us")