Commits

Anonymous committed a914281

fixed 5 failures in regressiontests.test_client_regress

Comments (0)

Files changed (1)

tests/regressiontests/test_client_regress/models.py

         "Get a view that has a simple string argument"
         response = self.client.get(reverse('arg_view', args=['Slartibartfast']))
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(response.content, 'Howdy, Slartibartfast')
+        self.assertEqual(to_utf8_string(response.content), 'Howdy, Slartibartfast')
 
     def test_argument_with_space_get(self):
         "Get a view that has a string argument that requires escaping"
         response = self.client.get(reverse('arg_view', args=['Arthur Dent']))
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(response.content, 'Hi, Arthur')
+        self.assertEqual(to_utf8_string(response.content), 'Hi, Arthur')
 
     def test_simple_argument_post(self):
         "Post for a view that has a simple string argument"
         response = self.client.post(reverse('arg_view', args=['Slartibartfast']))
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(response.content, 'Howdy, Slartibartfast')
+        self.assertEqual(to_utf8_string(response.content), 'Howdy, Slartibartfast')
 
     def test_argument_with_space_post(self):
         "Post for a view that has a string argument that requires escaping"
         response = self.client.post(reverse('arg_view', args=['Arthur Dent']))
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(response.content, 'Hi, Arthur')
+        self.assertEqual(to_utf8_string(response.content), 'Hi, Arthur')
 
 class ExceptionTests(TestCase):
     fixtures = ['testdata.json']
         data = '{"test": "json"}'
         response = self.client.put('/test_client_regress/request_methods/', data=data, content_type='application/json')
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(response.content, 'request method: PUT')
+        self.assertEqual(to_utf8_string(response.content), 'request method: PUT')
 
 class QueryStringTests(TestCase):
     def test_get_like_requests(self):