def setUp(self):
    '\n        Create two example sites that we can use to test what gets displayed\n        where.\n        '
    super(SitesTest, self).setUp()
    (self.site1, created1) = Site.objects.get_or_create(domain='example.com', name='example.com')
    (self.site2, created2) = Site.objects.get_or_create(domain='example.org', name='example.org')
    with self.settings(PHOTOLOGUE_MULTISITE=True):
        self.gallery1 = GalleryFactory(slug='test-gallery', sites=[self.site1])
        self.gallery2 = GalleryFactory(slug='not-on-site-gallery')
        self.photo1 = PhotoFactory(slug='test-photo', sites=[self.site1])
        self.photo2 = PhotoFactory(slug='not-on-site-photo')
        self.gallery1.photos.add(self.photo1, self.photo2)
    self.photo2.sites.clear()
Create two example sites that we can use to test what gets displayed
where.
def setUp(self):
    '\n        Create two example sites that we can use to test what gets displayed\n        where.\n        '
    super(SitesTest, self).setUp()
    (self.site1, created1) = Site.objects.get_or_create(domain='example.com', name='example.com')
    (self.site2, created2) = Site.objects.get_or_create(domain='example.org', name='example.org')
    with self.settings(PHOTOLOGUE_MULTISITE=True):
        self.gallery1 = GalleryFactory(slug='test-gallery', sites=[self.site1])
        self.gallery2 = GalleryFactory(slug='not-on-site-gallery')
        self.photo1 = PhotoFactory(slug='test-photo', sites=[self.site1])
        self.photo2 = PhotoFactory(slug='not-on-site-photo')
        self.gallery1.photos.add(self.photo1, self.photo2)
    self.photo2.sites.clear()