Fix test to use int instead of hex (don't prefix 0).
Covert keys() to list for Python 3.2 compatibility.