I’m a bit new to FDB, coming from a background of using Django and Flask with relational databases. I’m wondering if there is an established convention or best-practice for writing unit tests and integration tests that hit the database, and, in particular, cleaning up after those tests.
In the Django world, it’s typical to use an SQLite backend for tests and simply delete the .sqlite file at the end, or to use a separate database server, and use the ORM to remove all of the rows when a test completes.
Does Foundation have any equivalents to this? Right now, my crude, brute-force implementation is to just delete an entire subspace:
@fdb.transactional def clean_subspace(tr, subspace): del tr[subspace.range()]