Modernize sqlite3 tests

Update current tests that use old pattern with assertRaises
to make them more maintainable.
6 files changed