Skip to content

Commit d704611

Browse files
committed
fixed unittest
1 parent e97dd72 commit d704611

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

linode_api4/objects/monitor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class AlertChannelEnvelope(JSONObject):
295295

296296

297297
@dataclass
298-
class AlertType(Enum):
298+
class AlertType(StrEnum):
299299
"""
300300
Enumeration of alert origin types used by alert definitions.
301301
@@ -307,8 +307,8 @@ class AlertType(Enum):
307307
This enum can be used to compare or validate the `type` value when
308308
processing alert definitions.
309309
"""
310-
SYSTEM = "system"
311-
USER = "user"
310+
system = "system"
311+
user = "user"
312312

313313

314314
class AlertDefinition(DerivedBase):

linode_api4/objects/serializable.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ def attempt_serialize(value: Any) -> Any:
187187
if issubclass(type(value), JSONObject):
188188
return value._serialize(is_put=is_put)
189189

190-
# Handle Enum instances by returning their value
191-
if isinstance(value, Enum):
192-
return value.value
193-
194190
return value
195191

196192
def should_include(key: str, value: Any) -> bool:

0 commit comments

Comments
 (0)