Also check that .transform() runs without exceptions

This commit is contained in:
Simon Willison 2020-09-21 19:18:15 -07:00
commit 7b8e7c4207

View file

@ -79,6 +79,7 @@ import pytest
def test_transform_sql(fresh_db, params, expected_sql):
dogs = fresh_db["dogs"]
dogs.insert({"id": 1, "name": "Cleo", "age": "5"}, pk="id")
params["tmp_suffix"] = "suffix"
sql = dogs.transform_sql(**params)
sql = dogs.transform_sql(**{**params, **{"tmp_suffix": "suffix"}})
assert sql == expected_sql
# Check that .transform() runs without exceptions:
dogs.transform(**params)