todolists: tests: convert response.content to str
Network data is usually a bytes object while the todolist.name is a str.
This commit is contained in:
parent
f56caf45c0
commit
79ae9db6f3
@ -21,12 +21,12 @@ def setUp(self):
|
||||
def test_todolist_overview(self):
|
||||
response = self.client.get('/todo/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn(self.todolist.name, response.content)
|
||||
self.assertIn(self.todolist.name, response.content.decode())
|
||||
|
||||
def test_todolist_detail(self):
|
||||
response = self.client.get(self.todolist.get_absolute_url())
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn(self.todolist.name, response.content)
|
||||
self.assertIn(self.todolist.name, response.content.decode())
|
||||
|
||||
def test_todolist_json(self):
|
||||
response = self.client.get(self.todolist.get_absolute_url() + 'json')
|
||||
|
Loading…
Reference in New Issue
Block a user