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(),
"tests/hostkeymap", filename))
self.assertEquals(
self.assertEqual(
hostkeymap._sysconfig_keyboard(
_open("sysconfig-comments.txt")),
"")
self.assertEquals(
self.assertEqual(
hostkeymap._sysconfig_keyboard(
_open("sysconfig-rhel5.txt")),
"us")
self.assertEquals(
self.assertEqual(
hostkeymap._find_xkblayout(
_open("default-keyboard-debian9.txt")),
"us")
self.assertEquals(
self.assertEqual(
hostkeymap._find_xkblayout(
_open("console-setup-debian9.txt")),
None)
self.assertEquals(
self.assertEqual(
hostkeymap._xorg_keymap(
_open("xorg-rhel5.txt")),
"us")