(self)
| 1566 | s.commit() |
| 1567 | |
| 1568 | def test_we_dont_call_bool(self): |
| 1569 | class NoBoolAllowed: |
| 1570 | def __bool__(self): |
| 1571 | raise Exception("nope") |
| 1572 | |
| 1573 | self.mapper(NoBoolAllowed, self.tables.users) |
| 1574 | u1 = NoBoolAllowed() |
| 1575 | u1.name = "some name" |
| 1576 | s = Session(testing.db) |
| 1577 | s.add(u1) |
| 1578 | s.commit() |
| 1579 | assert s.get(NoBoolAllowed, u1.id) is u1 |
| 1580 | |
| 1581 | def test_we_dont_call_eq(self): |
| 1582 | class NoEqAllowed: |