Model logic / SQLite tests.