I have a use case to write contract test for file ...
# pact-python
j
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
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
yeah exactly the same error, Multipart encoder is not supported in request body
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
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.