Fix tests problem with backward incompatible function name.

Add __init__ methods to some of testing clases with overriding method name.
This commit is contained in:
Tomasz Kolek
2016-12-16 14:38:26 +01:00
committed by Tim Abbott
parent 7f3fdb2663
commit 34511065dc
4 changed files with 40 additions and 2 deletions

View File

@@ -78,6 +78,13 @@ class ZulipTestCase(TestCase):
functions have to fake out the linter by using a local variable called
django_client to fool the regext.
'''
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
# This method should be remove when we quit from python2
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp
super(ZulipTestCase, self).__init__(*args, **kwargs)
DEFAULT_REALM = Realm.objects.get(string_id='zulip')