TST to use sqlachemy syntax in tests

WIP first test working

WIP more tests pass