Without this, two tests fail with the error: `TypeError: dict_keys([1, 2]) is not JSON serializable`

The reason is that in Python 2, the `keys` method returns a `list`, but in Python 3, it return a `dict_keys` object. See:

http://stackoverflow.com/a/8953658/638434
http://www.python.org/dev/peps/pep-3106/