Use assert to run tests in transactions