def test_gallery_detail(self):
    response = self.client.get('/ptests/gallery/test-gallery/')
    self.assertEqual(response.context['object'], self.gallery1)
    response = self.client.get('/ptests/gallery/not-on-site-gallery/')
    self.assertEqual(response.status_code, 404)
def test_gallery_detail(self):
    response = self.client.get('/ptests/gallery/test-gallery/')
    self.assertEqual(response.context['object'], self.gallery1)
    response = self.client.get('/ptests/gallery/not-on-site-gallery/')
    self.assertEqual(response.status_code, 404)