summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/tests/test_config/test_adapters.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pyramid/tests/test_config/test_adapters.py b/pyramid/tests/test_config/test_adapters.py
index ff1ce52a1..84b7119cf 100644
--- a/pyramid/tests/test_config/test_adapters.py
+++ b/pyramid/tests/test_config/test_adapters.py
@@ -1,5 +1,6 @@
import unittest
+from pyramid.compat import PY3
from pyramid.tests.test_config import IDummy
class AdaptersConfiguratorMixinTests(unittest.TestCase):
@@ -103,8 +104,11 @@ class AdaptersConfiguratorMixinTests(unittest.TestCase):
def test_add_response_adapter_dottednames(self):
from pyramid.interfaces import IResponse
config = self._makeOne(autocommit=True)
- config.add_response_adapter('pyramid.response.Response',
- 'types.StringType')
+ if PY3: # pragma: no cover
+ str_name = 'builtins.str'
+ else:
+ str_name = '__builtin__.str'
+ config.add_response_adapter('pyramid.response.Response', str_name)
result = config.registry.queryAdapter('foo', IResponse)
- self.assertTrue(result.body, 'foo')
+ self.assertTrue(result.body, b'foo')