Fix integration tests

These tests were changing the db (because the transaction was being committed) and causing other tests to break if they run in a particular order.

These changes should mean that they tidy-up after themselves.