(db)
| 13 | |
| 14 | @pytest.mark.asyncio |
| 15 | async def test_create(db): |
| 16 | obj0 = await testmodels.BinaryFields.create(binary=bytes(range(256)) * 500) |
| 17 | obj = await testmodels.BinaryFields.get(id=obj0.id) |
| 18 | assert obj.binary == bytes(range(256)) * 500 |
| 19 | assert obj.binary_null is None |
| 20 | await obj.save() |
| 21 | obj2 = await testmodels.BinaryFields.get(id=obj.id) |
| 22 | assert obj == obj2 |
| 23 | |
| 24 | |
| 25 | @pytest.mark.asyncio |