python 3 compat: assure text, force list for KeysView and assertEquals