Skip to content

Commit c517e04

Browse files
style: apply auto-formatter fixes for CI mutation check
1 parent 4f690e3 commit c517e04

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

agent/tests/test_browser.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ def test_success_returns_presigned_url(self, monkeypatch):
2222
monkeypatch.setenv("BROWSER_TOOL_FUNCTION_NAME", "my-browser-fn")
2323
monkeypatch.setenv("AWS_REGION", "us-east-1")
2424

25-
response_payload = json.dumps({
26-
"status": "success",
27-
"screenshotS3Key": "screenshots/abc123.png",
28-
"presignedUrl": "https://s3.amazonaws.com/bucket/screenshots/abc123.png",
29-
}).encode()
25+
response_payload = json.dumps(
26+
{
27+
"status": "success",
28+
"screenshotS3Key": "screenshots/abc123.png",
29+
"presignedUrl": "https://s3.amazonaws.com/bucket/screenshots/abc123.png",
30+
}
31+
).encode()
3032

3133
mock_client = MagicMock()
3234
mock_client.invoke.return_value = {
@@ -43,10 +45,12 @@ def test_error_response_returns_none(self, monkeypatch):
4345
monkeypatch.setenv("BROWSER_TOOL_FUNCTION_NAME", "my-browser-fn")
4446
monkeypatch.setenv("AWS_REGION", "us-east-1")
4547

46-
response_payload = json.dumps({
47-
"status": "error",
48-
"error": "page not found",
49-
}).encode()
48+
response_payload = json.dumps(
49+
{
50+
"status": "error",
51+
"error": "page not found",
52+
}
53+
).encode()
5054

5155
mock_client = MagicMock()
5256
mock_client.invoke.return_value = {

cdk/src/handlers/browser-tool.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
*/
1919

2020
import { BedrockAgentCoreClient, StartBrowserSessionCommand, StopBrowserSessionCommand } from '@aws-sdk/client-bedrock-agentcore';
21-
import { PutObjectCommand, S3Client } from '@aws-sdk/client-s3';
21+
import { PutObjectCommand, S3Client, GetObjectCommand } from '@aws-sdk/client-s3';
2222
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
23-
import { GetObjectCommand } from '@aws-sdk/client-s3';
2423
import WebSocket from 'ws';
2524

2625
const agentCoreClient = new BedrockAgentCoreClient({});

0 commit comments

Comments
 (0)