1import pytest 2import UM.Dictionary 3 4 5def test_findKey(): 6 test_dict = {"omg": "zomg", "beep": "meep"} 7 assert UM.Dictionary.findKey(test_dict, "zomg") == "omg" 8 assert UM.Dictionary.findKey(test_dict, "meep") == "beep" 9 10 with pytest.raises(ValueError): 11 UM.Dictionary.findKey(test_dict, "Nope") 12