fix message of assert_isinstance

(expected and actual types were swapped in output)
add test for issue 5006