mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
tests: Remove old six.PY2 code paths.
This commit is contained in:
@@ -107,14 +107,6 @@ class ZulipTestCase(TestCase):
|
|||||||
functions have to fake out the linter by using a local variable called
|
functions have to fake out the linter by using a local variable called
|
||||||
django_client to fool the regext.
|
django_client to fool the regext.
|
||||||
'''
|
'''
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
# type: (*Any, **Any) -> None
|
|
||||||
# This method should be removed when we migrate to version 3 of Python
|
|
||||||
import six
|
|
||||||
if six.PY2:
|
|
||||||
self.assertRaisesRegex = self.assertRaisesRegexp
|
|
||||||
super(ZulipTestCase, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
DEFAULT_REALM = Realm.objects.get(string_id='zulip')
|
DEFAULT_REALM = Realm.objects.get(string_id='zulip')
|
||||||
|
|
||||||
@instrument_url
|
@instrument_url
|
||||||
|
|||||||
@@ -40,14 +40,6 @@ from zerver.models import \
|
|||||||
import ujson
|
import ujson
|
||||||
|
|
||||||
class DecoratorTestCase(TestCase):
|
class DecoratorTestCase(TestCase):
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
# type: (*Any, **Any) -> None
|
|
||||||
# This method should be removed when we migrate to version 3 of Python
|
|
||||||
import six
|
|
||||||
if six.PY2:
|
|
||||||
self.assertRaisesRegex = self.assertRaisesRegexp
|
|
||||||
super(TestCase, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def test_get_client_name(self):
|
def test_get_client_name(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
class Request(object):
|
class Request(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user