From 6668e43d2d67db4574e08a9d54bd80eb105c1b28 Mon Sep 17 00:00:00 2001 From: Sergey Maranchuk Date: Fri, 17 Apr 2020 22:12:06 +0300 Subject: inheriting from `object` not necessary in py3 --- tests/test_httpexceptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_httpexceptions.py') diff --git a/tests/test_httpexceptions.py b/tests/test_httpexceptions.py index 5decfc39c..a246dbaa6 100644 --- a/tests/test_httpexceptions.py +++ b/tests/test_httpexceptions.py @@ -74,7 +74,7 @@ class Test__no_escape(unittest.TestCase): ) def test_unicode(self): - class DummyUnicodeObject(object): + class DummyUnicodeObject: def __unicode__(self): return text_('42') @@ -392,7 +392,7 @@ class TestHTTPException(unittest.TestCase): exc = cls(body_template='${REQUEST_METHOD}') environ = _makeEnviron() - class Choke(object): + class Choke: def __str__(self): # pragma no cover raise ValueError @@ -514,11 +514,11 @@ class TestHTTPMethodNotAllowed(unittest.TestCase): ) -class DummyRequest(object): +class DummyRequest: exception = None -class DummyStartResponse(object): +class DummyStartResponse: def __call__(self, status, headerlist): self.status = status self.headerlist = headerlist -- cgit v1.2.3 From c7d9440a73dcf3970961c661855b1d92ee26ce86 Mon Sep 17 00:00:00 2001 From: Sergey Maranchuk Date: Sat, 18 Apr 2020 12:15:40 +0300 Subject: remove __unicode__ method --- tests/test_httpexceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_httpexceptions.py') diff --git a/tests/test_httpexceptions.py b/tests/test_httpexceptions.py index a246dbaa6..73469778a 100644 --- a/tests/test_httpexceptions.py +++ b/tests/test_httpexceptions.py @@ -75,7 +75,7 @@ class Test__no_escape(unittest.TestCase): def test_unicode(self): class DummyUnicodeObject: - def __unicode__(self): + def __str__(self): return text_('42') duo = DummyUnicodeObject() -- cgit v1.2.3