BUG: Fixed failing test due to use of basestring in python 3