This should just be a constant dictionary, it's much easier to read that way and you should generally avoid unnecessary programming in tests.