def test_auto_add_sites(self):
    '\n        Objects should not be automatically associated with a particular site when\n        ``PHOTOLOGUE_MULTISITE`` is ``True``.\n        '
    with self.settings(PHOTOLOGUE_MULTISITE=False):
        gallery = GalleryFactory()
        photo = PhotoFactory()
    self.assertEqual(list(gallery.sites.all()), [self.site1])
    self.assertEqual(list(photo.sites.all()), [self.site1])
    photo.delete()
    with self.settings(PHOTOLOGUE_MULTISITE=True):
        gallery = GalleryFactory()
        photo = PhotoFactory()
    self.assertEqual(list(gallery.sites.all()), [])
    self.assertEqual(list(photo.sites.all()), [])
    photo.delete()
Objects should not be automatically associated with a particular site when
``PHOTOLOGUE_MULTISITE`` is ``True``.
def test_auto_add_sites(self):
    '\n        Objects should not be automatically associated with a particular site when\n        ``PHOTOLOGUE_MULTISITE`` is ``True``.\n        '
    with self.settings(PHOTOLOGUE_MULTISITE=False):
        gallery = GalleryFactory()
        photo = PhotoFactory()
    self.assertEqual(list(gallery.sites.all()), [self.site1])
    self.assertEqual(list(photo.sites.all()), [self.site1])
    photo.delete()
    with self.settings(PHOTOLOGUE_MULTISITE=True):
        gallery = GalleryFactory()
        photo = PhotoFactory()
    self.assertEqual(list(gallery.sites.all()), [])
    self.assertEqual(list(photo.sites.all()), [])
    photo.delete()