unbreak tests

dict_keys and dict_values aren't subscriptable in Python 3; cast them to lists
so we can pull out the first item in each