MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / test_clone

Function test_clone

tests/test_model_methods.py:431–438  ·  view source on GitHub ↗
(tournament_model)

Source from the content-addressed store, hash-verified

429
430@pytest.mark.asyncio
431async def test_clone(tournament_model):
432 mdl = tournament_model
433 mdl2 = mdl.clone()
434 assert mdl2.pk is None
435 await mdl2.save()
436 assert mdl2.pk != mdl.pk
437 mdls = list(await Tournament.all())
438 assert len(mdls) == 2
439
440
441@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

saveMethod · 0.80
cloneMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…