tests: simplified database tests, added requote()