diff options
| author | Michael Merickel <michael@merickel.org> | 2018-11-12 23:16:09 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2018-11-12 23:16:09 -0600 |
| commit | b1a257bacc1c4ac2c1401ed02c51d9c6c03685d2 (patch) | |
| tree | a3024d0d24f192d1dd8c24eab6e9ec4b39169489 /tests/test_config | |
| parent | 6b0e4625da2c53a1e3fdb4857fc7c6ba6ce562cf (diff) | |
| download | pyramid-b1a257bacc1c4ac2c1401ed02c51d9c6c03685d2.tar.gz pyramid-b1a257bacc1c4ac2c1401ed02c51d9c6c03685d2.tar.bz2 pyramid-b1a257bacc1c4ac2c1401ed02c51d9c6c03685d2.zip | |
get rid of type aliases
Diffstat (limited to 'tests/test_config')
| -rw-r--r-- | tests/test_config/test_factories.py | 2 | ||||
| -rw-r--r-- | tests/test_config/test_views.py | 13 |
2 files changed, 3 insertions, 12 deletions
diff --git a/tests/test_config/test_factories.py b/tests/test_config/test_factories.py index cca528275..bbc38b6cd 100644 --- a/tests/test_config/test_factories.py +++ b/tests/test_config/test_factories.py @@ -160,7 +160,7 @@ class TestFactoriesMixin(unittest.TestCase): config = self._makeOne(autocommit=True) self.assertRaises(AttributeError, config.add_request_method) - def test_add_request_method_with_text_type_name(self): + def test_add_request_method_with_text_name(self): from pyramid.exceptions import ConfigurationError config = self._makeOne(autocommit=True) diff --git a/tests/test_config/test_views.py b/tests/test_config/test_views.py index b72b9b36a..aa5b67050 100644 --- a/tests/test_config/test_views.py +++ b/tests/test_config/test_views.py @@ -2795,15 +2795,6 @@ class TestViewsConfigurationMixin(unittest.TestCase): request = self._makeRequest(config) self.assertRaises(PredicateMismatch, wrapper, context, request) - # Since Python 3 has to be all cool and fancy and different... - def _assertBody(self, response, value): - from pyramid.compat import text_type - - if isinstance(value, text_type): # pragma: no cover - self.assertEqual(response.text, value) - else: # pragma: no cover - self.assertEqual(response.body, value) - def test_add_notfound_view_with_renderer(self): from zope.interface import implementedBy from pyramid.interfaces import IRequest @@ -2820,7 +2811,7 @@ class TestViewsConfigurationMixin(unittest.TestCase): request_iface=IRequest, ) result = view(None, request) - self._assertBody(result, '{}') + self.assertEqual(result.text, '{}') def test_add_forbidden_view_with_renderer(self): from zope.interface import implementedBy @@ -2838,7 +2829,7 @@ class TestViewsConfigurationMixin(unittest.TestCase): request_iface=IRequest, ) result = view(None, request) - self._assertBody(result, '{}') + self.assertEqual(result.text, '{}') def test_set_view_mapper(self): from pyramid.interfaces import IViewMapperFactory |
