Nit:
expected_queries = 9 + (1 if connection.features.can_release_savepoints else 0)