def test_photos_in_gallery(self):
    '\n        Only those photos are supposed to be shown in a gallery that are\n        also associated with the current site.\n        '
    response = self.client.get('/ptests/gallery/test-gallery/')
    self.assertEqual(list(response.context['object'].public()), [self.photo1])
Only those photos are supposed to be shown in a gallery that are
also associated with the current site.
def test_photos_in_gallery(self):
    '\n        Only those photos are supposed to be shown in a gallery that are\n        also associated with the current site.\n        '
    response = self.client.get('/ptests/gallery/test-gallery/')
    self.assertEqual(list(response.context['object'].public()), [self.photo1])