Skip to content

Commit

Permalink
forgotten import
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Dec 5, 2024
1 parent 4e07c6d commit defccec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/integrational/vcr_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
from base64 import b64decode, b64encode
from vcr.serializers.jsonserializer import serialize, deserialize
from aiohttp.formdata import FormData
from pickle import dumps, loads


Expand Down Expand Up @@ -31,7 +30,7 @@ def serialize(self, cassette_dict):
if type(interaction['response']['body']['string']) is bytes:
ascii_body = b64encode(interaction['response']['body']['string']).decode('ascii')
interaction['response']['body'] = {'binary': ascii_body}
if isinstance(interaction['request']['body'], FormData):
if interaction['request']['body']:
ascii_body = b64encode(dumps(interaction['request']['body'])).decode('ascii')
interaction['request']['body'] = {'pickle': ascii_body}

Expand Down

0 comments on commit defccec

Please sign in to comment.