diff --git a/httpretty/core.py b/httpretty/core.py
index <HASH>..<HASH> 100644
--- a/httpretty/core.py
+++ b/httpretty/core.py
@@ -242,7 +242,7 @@ class fakesock(object):
                     headers = utf8(last_requestline(self._sent_data))
                     body = utf8(self._sent_data[-1])
 
-                    if self._entry.body_is_callable:
+                    if self._entry.body_is_callable and hasattr(self, 'callable_body'):
                         self.callable_body(self.request, self.info.full_url(), headers)
 
                     try:
diff --git a/tests/functional/test_requests.py b/tests/functional/test_requests.py
index <HASH>..<HASH> 100644
--- a/tests/functional/test_requests.py
+++ b/tests/functional/test_requests.py
@@ -530,8 +530,8 @@ def test_httpretty_should_allow_registering_regexes_with_streaming_responses():
     )
 
     def gen():
-        yield 'hi'
-        yield 'there'
+        yield b'hi'
+        yield b'there'
 
     response = requests.post(
         'https://api.yipit.com/v1/deal;brand=gap?first_name=chuck&last_name=norris',
fixes for other python version