fix(types): resolve pyright errors in test_egress_addon_core
This commit is contained in:
@@ -22,7 +22,6 @@ from bot_bottle.egress_addon_core import (
|
|||||||
MatchEntry,
|
MatchEntry,
|
||||||
PathMatch,
|
PathMatch,
|
||||||
Route,
|
Route,
|
||||||
ScanResult,
|
|
||||||
build_outbound_scan_text,
|
build_outbound_scan_text,
|
||||||
decide,
|
decide,
|
||||||
evaluate_matches,
|
evaluate_matches,
|
||||||
@@ -739,16 +738,22 @@ class TestGitPushBlockFailFast(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class TestBuildOutboundScanText(unittest.TestCase):
|
class TestBuildOutboundScanText(unittest.TestCase):
|
||||||
def _build(self, **kwargs):
|
def _build(
|
||||||
defaults = dict(
|
self,
|
||||||
host="api.example.com",
|
*,
|
||||||
path="/v1/data",
|
host: str = "api.example.com",
|
||||||
query="",
|
path: str = "/v1/data",
|
||||||
headers={},
|
query: str = "",
|
||||||
body="",
|
headers: dict[str, str] | None = None,
|
||||||
|
body: str = "",
|
||||||
|
) -> str:
|
||||||
|
return build_outbound_scan_text(
|
||||||
|
host=host,
|
||||||
|
path=path,
|
||||||
|
query=query,
|
||||||
|
headers=headers or {},
|
||||||
|
body=body,
|
||||||
)
|
)
|
||||||
defaults.update(kwargs)
|
|
||||||
return build_outbound_scan_text(**defaults)
|
|
||||||
|
|
||||||
def test_host_appears(self):
|
def test_host_appears(self):
|
||||||
text = self._build(host="secret.attacker.com")
|
text = self._build(host="secret.attacker.com")
|
||||||
|
|||||||
Reference in New Issue
Block a user