@@ -261,6 +261,22 @@ def test_modelgen_06(self):
261261 self .assertIsInstance (user , default .User )
262262 self .assertIsInstance (user , default .CustomUser )
263263
264+ @tb .xfail
265+ def test_modelgen_07 (self ):
266+ from models .orm import default , std
267+
268+ wrapper = self .client .get (
269+ default .NamedWrapper .select (
270+ name = True ,
271+ thing = True ,
272+ ).filter (name = "custom_user" )
273+ )
274+ user = wrapper .thing
275+ assert user is not None
276+
277+ self .assertIsInstance (user , std .Object )
278+ self .assertIsInstance (user , default .CustomUser )
279+
264280 def test_modelgen_data_unpack_1a (self ):
265281 import gel
266282 from models .orm import default
@@ -1359,6 +1375,40 @@ def test_modelgen_pydantic_apis_11d(self):
13591375 self .assertPydanticPickles (t )
13601376 self .assertPydanticSerializes (t )
13611377
1378+ @tb .xfail
1379+ def test_modelgen_pydantic_apis_11e (self ):
1380+ # Test model_dump() and model_dump_json() on models;
1381+ # test *single required* link serialization in all combinations
1382+
1383+ from models .orm import default
1384+
1385+ u = default .User (name = "aaa" )
1386+ t = default .TestSingleLinksObjReqOnly (
1387+ req_wprop_obj = default .TestSingleLinksObjReqOnly .req_wprop_obj .link (
1388+ u , strength = 123
1389+ ),
1390+ )
1391+
1392+ self .assertPydanticPickles (t )
1393+ self .assertPydanticSerializes (t )
1394+
1395+ @tb .xfail
1396+ def test_modelgen_pydantic_apis_11f (self ):
1397+ # Test model_dump() and model_dump_json() on models;
1398+ # test *single required* link serialization in all combinations
1399+
1400+ from models .orm import default
1401+
1402+ u = default .User (name = "aaa" )
1403+ t = default .TestSingleLinksObjOptOnly (
1404+ opt_wprop_obj = default .TestSingleLinksObjOptOnly .opt_wprop_obj .link (
1405+ u , strength = 123
1406+ ),
1407+ )
1408+
1409+ self .assertPydanticPickles (t )
1410+ self .assertPydanticSerializes (t )
1411+
13621412 def test_modelgen_pydantic_apis_12 (self ):
13631413 import uuid
13641414 from models .orm import default
0 commit comments