コード例 #1
0
 def test_rendered_index_page(self):
     request = set_request(uri='/', user=vars.USER_ALICE)
     response = index(request)
     nickname_html = '<tr class="even"><th>Nickname</th><td>alice</td></tr>'
     self.assertIn(nickname_html, response.content)
コード例 #2
0
 def test_index_page_returns_200_for_logged_in(self):
     request = set_request(uri='/', user=vars.USER_ALICE)
     response = index(request)
     self.assertEqual(response.status_code, 200)