def test_photo_list(self):
    response = self.client.get('/ptests/photolist/')
    self.assertEqual(list(response.context['object_list']), [self.photo1])
def test_photo_list(self):
    response = self.client.get('/ptests/photolist/')
    self.assertEqual(list(response.context['object_list']), [self.photo1])