Skip to content

Commit 76d0169

Browse files
Format base URL decode hardening tests for Ruff
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 6711ce3 commit 76d0169

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/test_config.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,9 @@ def _raise_runtime_error(_value: str) -> str:
467467

468468
monkeypatch.setattr(config_module, "unquote", _raise_runtime_error)
469469

470-
with pytest.raises(HyperbrowserError, match="Failed to decode base_url path") as exc_info:
470+
with pytest.raises(
471+
HyperbrowserError, match="Failed to decode base_url path"
472+
) as exc_info:
471473
ClientConfig.normalize_base_url("https://example.local/api")
472474

473475
assert exc_info.value.original_error is not None
@@ -483,7 +485,9 @@ def _conditional_unquote(value: str) -> str:
483485

484486
monkeypatch.setattr(config_module, "unquote", _conditional_unquote)
485487

486-
with pytest.raises(HyperbrowserError, match="Failed to decode base_url host") as exc_info:
488+
with pytest.raises(
489+
HyperbrowserError, match="Failed to decode base_url host"
490+
) as exc_info:
487491
ClientConfig.normalize_base_url("https://example.local/api")
488492

489493
assert exc_info.value.original_error is not None
@@ -511,7 +515,9 @@ def _return_bytes(_value: str) -> bytes:
511515

512516
monkeypatch.setattr(config_module, "unquote", _return_bytes)
513517

514-
with pytest.raises(HyperbrowserError, match="Failed to decode base_url path") as exc_info:
518+
with pytest.raises(
519+
HyperbrowserError, match="Failed to decode base_url path"
520+
) as exc_info:
515521
ClientConfig.normalize_base_url("https://example.local/api")
516522

517523
assert exc_info.value.original_error is not None

0 commit comments

Comments
 (0)