def test_detail(self):
    resp = self.client.get('/polls/1/')
    self.assertEqual(resp.status_code, 200)
    self.assertEqual(resp.context['polls'].pk, 1)
    self.assertEqual(resp.context['polls'].question, 'Are you learning about testing in Django?')
    resp = self.client.get('/polls/2/')
    self.assertEqual(resp.status_code, 404)
def test_detail(self):
    resp = self.client.get('/polls/1/')
    self.assertEqual(resp.status_code, 200)
    self.assertEqual(resp.context['polls'].pk, 1)
    self.assertEqual(resp.context['polls'].question, 'Are you learning about testing in Django?')
    resp = self.client.get('/polls/2/')
    self.assertEqual(resp.status_code, 404)