Ejemplo n.º 1
0
    def setUp(self):
        self.client = Client()

        self.fake_oembed_site()
        rand_image = random_image(models.FileField())
        self.internal = InternalAttachment(file=rand_image)
        self.internal.save()

        external = 'http://youtu.be/-auzpsG_aVI'
        self.external = ExternalAttachment(oembed=external)
        self.external.save()

        self.responses = {
                self.internal: self.client.get(
                    self.internal.get_absolute_url(), follow=True),
                self.external: self.client.get(
                    self.external.get_absolute_url(), follow=True),
                }
Ejemplo n.º 2
0
 def setUp(self):
     self.fake_oembed_site()
     rand_image = random_image(models.FileField())
     self.attachment = InternalAttachment(file=rand_image)
     self.attachment.save()