MCPcopy
hub / github.com/google/clusterfuzz / get

Function get

src/appengine/handlers/testcase_detail/download_testcase.py:51–63  ·  view source on GitHub ↗

Get testcase file and write it to the handler.

(self)

Source from the content-addressed store, hash-verified

49
50
51def get(self):
52 """Get testcase file and write it to the handler."""
53 testcase_id = request.get('id')
54 testcase = access.check_access_and_get_testcase(testcase_id)
55
56 blob_info, _ = get_testcase_blob_info(testcase)
57
58 save_as_filename = 'testcase-%s-%s' % (
59 testcase.key.id(), blob_info.filename[-PREVIEW_BLOB_FILENAME_LENTGH:])
60
61 content_disposition = str('attachment; filename=%s' % save_as_filename)
62 return self.serve_gcs_object(blob_info.bucket, blob_info.object_path,
63 content_disposition)
64
65
66class Handler(base_handler.Handler, gcs.SignedGcsHandler):

Callers 1

getMethod · 0.70

Calls 4

get_testcase_blob_infoFunction · 0.85
serve_gcs_objectMethod · 0.80
getMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected