Fix py3k tests

Closes #274 
I think, simply converting to a list might be problematic since the order of the keys in the `keys()` set might depend on the internal implementation of the dict.