lint: Ban use of deprecated assertEquals.

This commit is contained in:
Tim Abbott 2017-02-08 16:32:42 -08:00
parent a2d935a2ee
commit 0c363dffca
2 changed files with 3 additions and 1 deletions

View File

@ -326,6 +326,8 @@ def build_custom_checkers(by_lang):
{'pattern': "^\s+[#]\w",
'strip': '\n',
'description': 'Missing whitespace after "#"'},
{'pattern': "assertEquals[(]",
'description': 'Use assertEqual, not assertEquals (which is deprecated).'},
{'pattern': "== None",
'exclude': 'tools/lint-all',
'description': 'Use `is None` to check whether something is None'},

View File

@ -292,7 +292,7 @@ class ZulipTestCase(TestCase):
# type: (str, bytes) -> None
response = self.client_get(url)
data = b"".join(response.streaming_content)
self.assertEquals(result, data)
self.assertEqual(result, data)
def assert_json_success(self, result):
# type: (HttpResponse) -> Dict[str, Any]