(self)
| 1734 | ) |
| 1735 | |
| 1736 | def test_b_only(self): |
| 1737 | A, B, C = self.classes("A", "B", "C") |
| 1738 | self._fixture(b_p=True) |
| 1739 | |
| 1740 | s = fixture_session() |
| 1741 | a1, b1, c1 = A(id=1), B(id=2), C(cid=1, id=3) |
| 1742 | s.add_all([a1, b1, c1]) |
| 1743 | s.commit() |
| 1744 | |
| 1745 | s.delete(a1) |
| 1746 | |
| 1747 | with self.sql_execution_asserter(testing.db) as asserter: |
| 1748 | s.flush() |
| 1749 | asserter.assert_( |
| 1750 | CompiledSQL( |
| 1751 | "SELECT a.id, a.type FROM a WHERE a.id = :pk_1", |
| 1752 | [{"pk_1": 1}], |
| 1753 | ), |
| 1754 | CompiledSQL("DELETE FROM a WHERE a.id = :id", [{"id": 1}]), |
| 1755 | ) |
| 1756 | |
| 1757 | b1.id |
| 1758 | s.delete(b1) |
| 1759 | with self.sql_execution_asserter(testing.db) as asserter: |
| 1760 | s.flush() |
| 1761 | asserter.assert_( |
| 1762 | CompiledSQL("DELETE FROM a WHERE a.id = :id", [{"id": 2}]) |
| 1763 | ) |
| 1764 | |
| 1765 | c1.id |
| 1766 | s.delete(c1) |
| 1767 | with self.sql_execution_asserter(testing.db) as asserter: |
| 1768 | s.flush() |
| 1769 | asserter.assert_( |
| 1770 | CompiledSQL("DELETE FROM a WHERE a.id = :id", [{"id": 3}]) |
| 1771 | ) |
| 1772 | |
| 1773 | def test_a_only(self): |
| 1774 | A, B, C = self.classes("A", "B", "C") |
nothing calls this directly
no test coverage detected