table.has_counts_triggers property, refs #219

This commit is contained in:
Simon Willison 2021-01-03 12:41:24 -08:00
commit b4f09146d3
4 changed files with 46 additions and 4 deletions

View file

@ -154,6 +154,14 @@ def test_triggers_and_triggers_dict(fresh_db):
assert fresh_db.triggers_dict == expected_triggers
def test_has_counts_triggers(fresh_db):
authors = fresh_db["authors"]
authors.insert({"name": "Frank Herbert"})
assert not authors.has_counts_triggers
authors.enable_counts()
assert authors.has_counts_triggers
@pytest.mark.parametrize(
"sql,expected_name,expected_using",
[