Skip to content

Commit 2e42af9

Browse files
committed
Fixed Copilot comments on unit and integration tests
1 parent d90f992 commit 2e42af9

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

linode_api4/objects/monitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class EmailChannelContent(JSONObject):
363363
Represents the content for an email alert channel.
364364
"""
365365

366-
email_addresses: List[str] = None
366+
email_addresses: Optional[List[str]] = None
367367

368368

369369
@dataclass
@@ -372,7 +372,7 @@ class ChannelContent(JSONObject):
372372
Represents the content block for an AlertChannel, which varies by channel type.
373373
"""
374374

375-
email: EmailChannelContent = None
375+
email: Optional[EmailChannelContent] = None
376376
# Other channel types like 'webhook', 'slack' could be added here as Optional fields.
377377

378378

test/fixtures/monitor_alert-definitions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"id": 12345,
55
"label": "Test Alert for DBAAS",
66
"service_type": "dbaas",
7-
"severity": "warning",
7+
"severity": 1,
88
"type": "user",
99
"description": "A test alert for dbaas service",
1010
"conditions": [],

test/fixtures/monitor_services_dbaas_alert-definitions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"id": 12345,
55
"label": "Test Alert for DBAAS",
66
"service_type": "dbaas",
7-
"severity": "warning",
8-
"type": "cpu",
7+
"severity": 1,
8+
"type": "user",
99
"description": "A test alert for dbaas service",
1010
"entity_ids": [
1111
13217

test/unit/groups/monitor_api_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_create_alert_definition(self):
9696
alert = self.client.monitor.create_alert_definition(
9797
service_type=service_type,
9898
label="Created Alert",
99-
severity="warning",
99+
severity=1,
100100
channel_ids=[1, 2],
101101
rule_criteria={"rules": []},
102102
trigger_conditions={"criteria_condition": "ALL"},

0 commit comments

Comments
 (0)