I have a use case to write contract test for file upload endpoint where we use MultiPartEncoder to upload a file but it looks pact does not accept Multipart Encoder request body, Do we have alternative solution in pact-python
m
Matt (pactflow.io / pact-js / pact-go)
12/07/2022, 11:39 PM
what error are you seeing? Pact should definitely support multippart headers etc., but Python may not support matching the bodies (assuming they are binary or something)
j
Jayesh Guru
12/08/2022, 3:44 PM
yeah exactly the same error, Multipart encoder is not supported in request body
Jayesh Guru
12/08/2022, 3:46 PM
we need to still handle this as provider will replay the request on their side so we need a real request to be part of the pact
m
Matt (pactflow.io / pact-js / pact-go)
12/09/2022, 6:32 AM
Sorry I’m still unclear of the problem. Can you please share a code snippet of what you’re trying? You should be able to match on the path, headers etc.