Fixes for thinking sphinx in tests