(self)
| 1403 | self.assert_(len(p._children) == 3) |
| 1404 | |
| 1405 | def test_slicing_list(self): |
| 1406 | Parent, Child = self.classes(class="st">"Parent", class="st">"Child") |
| 1407 | |
| 1408 | self.session = fixture_session() |
| 1409 | |
| 1410 | self.mapper_registry.map_imperatively( |
| 1411 | Parent, |
| 1412 | self.tables.Parent, |
| 1413 | properties={ |
| 1414 | class="st">"_children": relationship( |
| 1415 | Child, lazy=class="st">"select", collection_class=list |
| 1416 | ) |
| 1417 | }, |
| 1418 | ) |
| 1419 | |
| 1420 | p = Parent(class="st">"p") |
| 1421 | p.children = [class="st">"a", class="st">"b", class="st">"c"] |
| 1422 | |
| 1423 | p = self.roundtrip(p) |
| 1424 | |
| 1425 | self.assert_(len(p._children) == 3) |
| 1426 | eq_(class="st">"b", p.children[1]) |
| 1427 | eq_([class="st">"b", class="st">"c"], p.children[-2:]) |
| 1428 | |
| 1429 | def test_lazy_scalar(self): |
| 1430 | Parent, Child = self.classes(class="st">"Parent", class="st">"Child") |
nothing calls this directly
no test coverage detected