fix tests so that they work in virutalenv