(self)
| 1380 | self.assert_("_children" in p.__dict__) |
| 1381 | |
| 1382 | def test_eager_list(self): |
| 1383 | Parent, Child = self.classes("Parent", "Child") |
| 1384 | |
| 1385 | self.session = fixture_session() |
| 1386 | |
| 1387 | self.mapper_registry.map_imperatively( |
| 1388 | Parent, |
| 1389 | self.tables.Parent, |
| 1390 | properties={ |
| 1391 | "_children": relationship( |
| 1392 | Child, lazy="joined", collection_class=list |
| 1393 | ) |
| 1394 | }, |
| 1395 | ) |
| 1396 | |
| 1397 | p = Parent("p") |
| 1398 | p.children = ["a", "b", "c"] |
| 1399 | |
| 1400 | p = self.roundtrip(p) |
| 1401 | |
| 1402 | self.assert_("_children" in p.__dict__) |
| 1403 | self.assert_(len(p._children) == 3) |
| 1404 | |
| 1405 | def test_slicing_list(self): |
| 1406 | Parent, Child = self.classes("Parent", "Child") |
nothing calls this directly
no test coverage detected