Beispiel #1
0
 def test_used_image_document_get_usage(self):
     page = EventPage.objects.get(id=4)
     event_page_carousel_item = EventPageCarouselItem()
     event_page_carousel_item.page = page
     event_page_carousel_item.image = self.image
     event_page_carousel_item.save()
     self.assertTrue(issubclass(Page, type(self.image.get_usage()[0])))
Beispiel #2
0
 def test_used_image_document_get_usage(self):
     page = EventPage.objects.get(id=4)
     event_page_carousel_item = EventPageCarouselItem()
     event_page_carousel_item.page = page
     event_page_carousel_item.image = self.image
     event_page_carousel_item.save()
     self.assertTrue(issubclass(Page, type(self.image.get_usage()[0])))
Beispiel #3
0
 def test_used_image_document_usage_count(self):
     page = EventPage.objects.get(id=4)
     event_page_carousel_item = EventPageCarouselItem()
     event_page_carousel_item.page = page
     event_page_carousel_item.image = self.image
     event_page_carousel_item.save()
     self.assertEqual(self.image.get_usage().count(), 1)
Beispiel #4
0
 def test_used_image_document_usage_count(self):
     page = EventPage.objects.get(id=4)
     event_page_carousel_item = EventPageCarouselItem()
     event_page_carousel_item.page = page
     event_page_carousel_item.image = self.image
     event_page_carousel_item.save()
     self.assertEqual(self.image.get_usage().count(), 1)