Add tests around casting import function to str

Add tests to ensure that __import__ fromlist is called with a str and
not a unicode type.