Put test_select_relation in the correct testcase
Add tests for JOIN types and model resolution
Use six.string_types to avoid basestring
Use six in tests as well
Make coverage ignore unsupport warning branch