File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -430,16 +430,26 @@ class Disposition:
430
430
"custom_rule", "block_list", and "default". If you do not have custom
431
431
rules set up, ``None`` will be returned.
432
432
433
+ :type: str | None
434
+
435
+ .. attribute:: rule_label
436
+
437
+ The label of the custom rule that was triggered. If you do not have
438
+ custom rule set up, or the custom rule that was triggered does not have a
439
+ label, ``None`` will be returned.
440
+
433
441
:type: str | None
434
442
"""
435
443
436
444
action : Optional [str ]
437
445
reason : Optional [str ]
446
+ rule_label : Optional [str ]
438
447
439
448
__slots__ = ()
440
449
_fields = {
441
450
"action" : None ,
442
451
"reason" : None ,
452
+ "rule_label" : None ,
443
453
}
444
454
445
455
Original file line number Diff line number Diff line change @@ -99,10 +99,13 @@ def test_device(self):
99
99
self .assertEqual (local_time , device .local_time )
100
100
101
101
def test_disposition (self ):
102
- disposition = Disposition ({"action" : "accept" , "reason" : "default" })
102
+ disposition = Disposition (
103
+ {"action" : "accept" , "reason" : "default" , "rule_label" : "custom rule label" }
104
+ )
103
105
104
106
self .assertEqual ("accept" , disposition .action )
105
107
self .assertEqual ("default" , disposition .reason )
108
+ self .assertEqual ("custom rule label" , disposition .rule_label )
106
109
107
110
def test_email (self ):
108
111
first_seen = "2016-01-01"
You can’t perform that action at this time.
0 commit comments