Changed tests to handle new hashing order.

Hashing of strings changed in version 1.6, which requires more flexible
handling in the tests.