I have an enum like this
class testEnum(Enum):
Code_1 = "successful response"
Code_2 = "failure response"
Then I have a method that takes the enum key name Code_1 and enum key value successful response as inputs.
If I send testEnum.Code_1 then that resolves to successful response and not Code_1.
I checked some documentation online that suggests to use testEnum.Code_1.name but that throws an error saing that 'name' doesn't exist for the enum item.
Does anyone know how to get the name of the enum key ?