[test] fix test base module python2 compatibility

see #487 and #489