add save_all, some optimizations

This commit is contained in:
collerek
2021-03-26 16:28:34 +01:00
parent 8f60593123
commit 5a3b170d06
3 changed files with 30 additions and 5 deletions

View File

@ -110,6 +110,9 @@ async def test_saving_many_to_many():
count = await hq.save_related()
assert count == 0
count = await hq.save_related(save_all=True)
assert count == 2
hq.nicks[0].name = "Kabucha"
hq.nicks[1].name = "Kabucha2"
assert not hq.nicks[0].saved