add tests for update too

This commit is contained in:
collerek
2020-12-07 13:54:53 +01:00
parent f08ae49834
commit 0706306c74

View File

@ -54,3 +54,10 @@ async def test_model_relationship():
assert ws.id == 1 assert ws.id == 1
assert ws.topic == "Topic 1" assert ws.topic == "Topic 1"
assert ws.category.name == "Foo" assert ws.category.name == "Foo"
ws.topic = 'Topic 2'
await ws.update()
assert ws.id == 1
assert ws.topic == "Topic 2"
assert ws.category.name == "Foo"