46
46
)
47
47
from b2 ._internal .console_tool import current_time_millis
48
48
49
- from ..helpers import skip_on_windows
49
+ from ..helpers import assert_dict_equal_ignore_extra , skip_on_windows
50
50
from .helpers import (
51
51
ONE_DAY_MILLIS ,
52
52
ONE_HOUR_MILLIS ,
@@ -3465,7 +3465,7 @@ def test_notification_rules(b2_tool, bucket_name):
3465
3465
expected_stderr_pattern = private_preview_pattern
3466
3466
)
3467
3467
expected_rules = [{** notification_rule , "isSuspended" : False , "suspensionReason" : "" }]
3468
- assert created_rule == expected_rules [0 ]
3468
+ assert_dict_equal_ignore_extra ( created_rule , expected_rules [0 ])
3469
3469
3470
3470
# modify rule
3471
3471
secret = "0testSecret000000000000000000032"
@@ -3485,13 +3485,16 @@ def test_notification_rules(b2_tool, bucket_name):
3485
3485
)
3486
3486
expected_rules [0 ].update ({"objectNamePrefix" : "prefix" , "isEnabled" : False })
3487
3487
expected_rules [0 ]["targetConfiguration" ]["hmacSha256SigningSecret" ] = secret
3488
- assert modified_rule == expected_rules [0 ]
3488
+ assert_dict_equal_ignore_extra ( modified_rule , expected_rules [0 ])
3489
3489
3490
3490
# read updated rules
3491
- assert b2_tool .should_succeed_json (
3492
- ["bucket" , "notification-rule" , "list" , f"b2://{ bucket_name } " , "--json" ],
3493
- expected_stderr_pattern = private_preview_pattern
3494
- ) == expected_rules
3491
+ assert_dict_equal_ignore_extra (
3492
+ b2_tool .should_succeed_json (
3493
+ ["bucket" , "notification-rule" , "list" , f"b2://{ bucket_name } " , "--json" ],
3494
+ expected_stderr_pattern = private_preview_pattern
3495
+ ),
3496
+ expected_rules ,
3497
+ )
3495
3498
3496
3499
# delete rule by name
3497
3500
assert b2_tool .should_succeed (
0 commit comments