Test JSON field with validate from string.
(db)
| 345 | |
| 346 | @pytest.mark.asyncio |
| 347 | async def test_validate_str(db): |
| 348 | """Test JSON field with validate from string.""" |
| 349 | obj0 = await testmodels.JSONFields.create(data=[], data_validate='["text", 5]') |
| 350 | obj = await testmodels.JSONFields.get(id=obj0.id) |
| 351 | assert obj.data_validate == ["text", 5] |
| 352 | |
| 353 | |
| 354 | @pytest.mark.asyncio |