def test_from_string_with_broken_value(self): with pytest.raises(ValueError): UserIdHashType.from_string("unknown")
def test_from_string(self, str_value, expected_value): assert UserIdHashType.from_string(str_value) == expected_value