mirror of
https://github.com/rookiestar28/ComfyUI-OpenClaw.git
synced 2026-08-14 00:48:07 +00:00
chore: apply auto format
This commit is contained in:
@@ -171,4 +171,3 @@ def build_advisory_status(
|
||||
) -> Dict[str, Any]:
|
||||
advisories = load_advisories(advisory_file=advisory_file)
|
||||
return evaluate_advisories(current_version=current_version, advisories=advisories)
|
||||
|
||||
|
||||
@@ -201,4 +201,3 @@ def request_tenant_scope(
|
||||
yield ctx
|
||||
finally:
|
||||
_CURRENT_TENANT.reset(token)
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ class TestS48SecurityAdvisories(unittest.TestCase):
|
||||
self.assertTrue(result["affected"])
|
||||
self.assertEqual(result["high_severity_affected"], 1)
|
||||
self.assertEqual(result["mitigation"], "Upgrade to >=0.3.4 immediately.")
|
||||
affected_ids = {entry["id"] for entry in result["advisories"] if entry["affected"]}
|
||||
affected_ids = {
|
||||
entry["id"] for entry in result["advisories"] if entry["affected"]
|
||||
}
|
||||
self.assertEqual(affected_ids, {"OPENCLAW-2026-0001"})
|
||||
|
||||
def test_evaluate_advisories_unaffected(self):
|
||||
@@ -64,4 +66,3 @@ class TestS48SecurityAdvisories(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
@@ -52,4 +52,3 @@ class TestS48SecurityDoctorAdvisorySurface(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ class TestTenantContext(unittest.IsolatedAsyncioTestCase):
|
||||
|
||||
def test_multi_tenant_header_resolution(self):
|
||||
with patch.dict("os.environ", {"OPENCLAW_MULTI_TENANT_ENABLED": "1"}):
|
||||
ctx = resolve_tenant_context(request=_Req({"X-OpenClaw-Tenant-Id": "team-a"}))
|
||||
ctx = resolve_tenant_context(
|
||||
request=_Req({"X-OpenClaw-Tenant-Id": "team-a"})
|
||||
)
|
||||
self.assertEqual(ctx.tenant_id, "team-a")
|
||||
|
||||
def test_multi_tenant_mismatch_fail_closed(self):
|
||||
|
||||
@@ -30,4 +30,3 @@ export function buildDoctorAdvisoryBanner(report) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -44,4 +44,3 @@ describe("openclaw security advisory banner helper", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user