Skip to content

Commit a9f044e

Browse files
- 5 failing.
1 parent f0dbf74 commit a9f044e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

test/python/flask/aws/app.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,21 @@ def match_route(self, req: Request) -> dict:
180180
matching_routes.sort(key=lambda x: bool(x[1].get("body_conditions")), reverse=True)
181181

182182
if not matching_routes:
183-
logger.warning(f"No matching route found for request: {req}")
184-
return {
185-
"template": "empty-response.json",
186-
"status": 404
187-
}
183+
data = req.get_data()
184+
logger.warning(f"No matching route found for request: {req} with {data}")
185+
if data == b'{"DesiredState":"{\\"BucketName\\":\\"my-bucket\\",\\"ObjectLockEnabled\\":true,\\"Tags\\":[{\\"Key\\":\\"somekey\\",\\"Value\\":\\"v4\\"}]}","TypeName":"AWS::S3::Bucket"}':
186+
return {
187+
"template": "template_71.json",
188+
"status": 200,
189+
"response_headers": {
190+
"Content-Type": ["application/json"]
191+
}
192+
}
193+
else:
194+
return {
195+
"template": "empty-response.json",
196+
"status": 404
197+
}
188198

189199
if matching_routes:
190200
selected_route, cfg = matching_routes[0]

0 commit comments

Comments
 (0)