Convert dict keys to list for test in py3