diff --git a/test/unit/console_tool/test_notification_rules.py b/test/unit/console_tool/test_notification_rules.py index afe87f14..bd5c3ecf 100644 --- a/test/unit/console_tool/test_notification_rules.py +++ b/test/unit/console_tool/test_notification_rules.py @@ -11,9 +11,9 @@ import pytest - COMMANDS = (["bucket", "notification-rule"], ["notification-rules"]) + @pytest.fixture() def bucket_notification_rule(b2_cli, bucket): rule = { @@ -70,6 +70,7 @@ def test_notification_rules__list_all(b2_cli, bucket, bucket_notification_rule): """ ) + def test_notification_rules__list_all_json(b2_cli, bucket, bucket_notification_rule): for command in COMMANDS: _, stdout, _ = b2_cli.run([ @@ -266,6 +267,6 @@ def test_notification_rules__sign_secret(b2_cli, bucket, bucket_notification_rul bucket_notification_rule["targetConfiguration"]["hmacSha256SigningSecret"] = "7" * 32 assert json.loads(stdout) == bucket_notification_rule - assert json.loads( - b2_cli.run([*command, "list", "--json", f"b2://{bucket}"],)[1] - ) == [bucket_notification_rule] + assert json.loads(b2_cli.run([*command, "list", "--json", f"b2://{bucket}"],)[1]) == [ + bucket_notification_rule + ]