The following code causes an Invalid Format Specifier when the string is converted to an f-string. I can't pinpoint what the problem is as my quotations look okay.
expected_document = f'{"name":"tenders","value":"chicken","key":"{key}"}'
causes:
> expected_document = f'{"name":"tenders","value":"chicken","key":"{key}"}'
E ValueError: Invalid format specifier
while removing the f
:
expected_document = '{"name":"tenders","value":"chicken","key":"{key}"}'
works fine.