Ejemplo n.º 1
0
    def test_refresh_arc_task(self):
        # This may change at Comic Vine so it's a bit fragile but for now let's
        # us it.
        desc = "In the chaos ensuing after the unleashing of the OMACs on Earth, the Spectre's vendetta against magic, and "
        desc += "the Rann-Thanagar War, four beings decide to try and save the universe: Superman and Lois Lane of Earth-Two, "
        desc += "Superboy of Earth-Prime, and Alexander Luthor of Earth-Three. What resulted was the *Infinite Crisis.*"
        refresh_arc_task(self.crisis.cvid)
        self.crisis.refresh_from_db()
        # Clean up the image
        if (self.crisis.image):
            self.crisis.image.delete()

        self.assertEqual(self.crisis.desc, desc)
Ejemplo n.º 2
0
    def refresh_arc_metadata(self, request, queryset):
        rows_updated = 0
        for arc in queryset:
            success = refresh_arc_task(arc.cvid)
            if success:
                rows_updated += 1

        message_bit = create_msg(rows_updated)
        self.message_user(request, "%s successfully refreshed." % message_bit)