diff --git a/tests/test_http_response.py b/tests/test_http_response.py index e64d0eeba..fa74b468b 100644 --- a/tests/test_http_response.py +++ b/tests/test_http_response.py @@ -411,8 +411,8 @@ class TextResponseTest(BaseResponseTest): def test_follow_selector_list(self): resp = self._links_response() - self.assertRaisesRegex(ValueError, 'SelectorList', - resp.follow, resp.css('a')) + self.assertRaisesRegexp(ValueError, 'SelectorList', + resp.follow, resp.css('a')) def test_follow_selector_attribute(self): resp = self._links_response() @@ -435,7 +435,7 @@ class TextResponseTest(BaseResponseTest): resp1 = self.response_class( 'http://example.com', encoding='utf8', - body='click me'.encode('utf8') + body=u'click me'.encode('utf8') ) req = self._assert_followed_url( resp1.css('a')[0], @@ -447,7 +447,7 @@ class TextResponseTest(BaseResponseTest): resp2 = self.response_class( 'http://example.com', encoding='cp1251', - body='click me'.encode('cp1251') + body=u'click me'.encode('cp1251') ) req = self._assert_followed_url( resp2.css('a')[0],