def METHOD_NAME(self, app):
    self.build.state = BUILD_STATE_INSTALLING
    self.build.save()
    self.client.force_login(self.user)
    url = reverse("builds_detail", args=[self.project.slug, self.build.pk])
    resp = self.client.post(url)
    self.assertEqual(resp.status_code, 302)
    app.control.revoke.assert_called_once_with(
        self.build.task_id, signal=mock.ANY, terminate=True
    )
    self.build.refresh_from_db()
    self.assertEqual(self.build.state, BUILD_STATE_INSTALLING)