forked from mtusi2026/mtusi2026lab4
feat: two-store reconciler with safe repair and cost measurement (grade 5, track 2)
This commit is contained in:
@@ -14,6 +14,7 @@ def main():
|
||||
p.add_argument('--expect', type=int, default=201)
|
||||
p.add_argument('--file', default=str(ROOT / 'scripts/fixtures/sample.jpg'))
|
||||
p.add_argument('--content-type', default='image/jpeg')
|
||||
p.add_argument('--attach', action='store_true', help='also attach the upload to a new message')
|
||||
|
||||
args = arguments('Single upload used by compensation drills; creates synthetic data', configure)
|
||||
source = Path(args.file)
|
||||
@@ -29,6 +30,9 @@ def main():
|
||||
if response['status'] == 201:
|
||||
attachment = response['json']
|
||||
print(f"attachment={attachment['id']} size={attachment['size_bytes']}")
|
||||
if args.attach:
|
||||
message = c.message(alice, chat, '', attachments=[attachment['id']])['json']
|
||||
print(f"message={message['id']} attachment_ids={message['attachment_ids']}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user