mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix api tests
This commit is contained in:
parent
b6ed8f0684
commit
4353b5e911
@ -18,7 +18,7 @@ export const Guess = t.Recursive((Self) =>
|
||||
{ default: [] },
|
||||
),
|
||||
),
|
||||
externalId: t.Optional(t.String()),
|
||||
externalId: t.Optional(t.Record(t.String(), t.String())),
|
||||
|
||||
from: t.String({
|
||||
description: "Name of the tool that made the guess",
|
||||
|
@ -6,7 +6,7 @@ import { shows } from "~/db/schema";
|
||||
import { bubble } from "~/models/examples";
|
||||
import { dune1984 } from "~/models/examples/dune-1984";
|
||||
import { dune } from "~/models/examples/dune-2021";
|
||||
import { handlers, createMovie, getMovies } from "../helpers";
|
||||
import { createMovie, getMovies, handlers } from "../helpers";
|
||||
|
||||
beforeAll(async () => {
|
||||
await db.delete(shows);
|
||||
|
@ -7,7 +7,7 @@ import { bubble } from "~/models/examples";
|
||||
import { dune1984 } from "~/models/examples/dune-1984";
|
||||
import { dune } from "~/models/examples/dune-2021";
|
||||
import type { Movie } from "~/models/movie";
|
||||
import { handlers, createMovie, getMovies } from "../helpers";
|
||||
import { createMovie, getMovies, handlers } from "../helpers";
|
||||
|
||||
beforeAll(async () => {
|
||||
await db.delete(shows);
|
||||
|
@ -275,7 +275,7 @@ describe("Video seeding", () => {
|
||||
episodes: [{ season: 1, episode: 13 }],
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { serieId: "72636", season: 1, episode: 13 },
|
||||
themoviedatabase: "72636",
|
||||
},
|
||||
},
|
||||
part: null,
|
||||
@ -319,7 +319,7 @@ describe("Video seeding", () => {
|
||||
title: "bubble",
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { dataId: "912598" },
|
||||
themoviedatabase: "912598",
|
||||
},
|
||||
},
|
||||
part: null,
|
||||
@ -378,7 +378,7 @@ describe("Video seeding", () => {
|
||||
title: "bubble",
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { dataId: "912598" },
|
||||
themoviedatabase: "912598",
|
||||
},
|
||||
},
|
||||
part: null,
|
||||
@ -424,7 +424,7 @@ describe("Video seeding", () => {
|
||||
title: "bubble",
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { dataId: "912598" },
|
||||
themoviedatabase: "912598",
|
||||
},
|
||||
},
|
||||
part: null,
|
||||
@ -471,7 +471,7 @@ describe("Video seeding", () => {
|
||||
title: "bubble",
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { dataId: "912598" },
|
||||
themoviedatabase: "912598",
|
||||
},
|
||||
},
|
||||
part: 1,
|
||||
@ -492,7 +492,7 @@ describe("Video seeding", () => {
|
||||
title: "bubble",
|
||||
from: "test",
|
||||
externalId: {
|
||||
themoviedatabase: { dataId: "912598" },
|
||||
themoviedatabase: "912598",
|
||||
},
|
||||
},
|
||||
part: 2,
|
||||
|
@ -40,7 +40,7 @@ class KyooClient:
|
||||
json=[x.model_dump_json() for x in videos],
|
||||
) as r:
|
||||
r.raise_for_status()
|
||||
return list[VideoCreated](** await r.json())
|
||||
return list[VideoCreated](**await r.json())
|
||||
|
||||
async def delete_videos(self, videos: list[str] | set[str]):
|
||||
async with self._client.delete(
|
||||
|
Loading…
x
Reference in New Issue
Block a user