fix tests for python 3.4, since python 3.4 made dict keys in random
order, simple comparing strings will cause tests to fail randomly.