Skip to content

Commit

Permalink
refactor(test_transform): optimize base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedhossamdev committed Jul 7, 2024
1 parent ffe2774 commit 1b2f58e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,7 @@ async def test_base64_file_input(use_async: bool) -> None:

# pathlib.Path is automatically converted to base64
result = await transform({"foo": SAMPLE_FILE_PATH}, TypedDictBase64Input, use_async)
assert result["foo"] in [
"SGVsbG8sIHdvcmxkIVxuCg",
"SGVsbG8sIHdvcmxkIVxuDQo="
]
assert result["foo"] in ["SGVsbG8sIHdvcmxkIVxuCg", "SGVsbG8sIHdvcmxkIVxuDQo="] # type: ignore[comparison-overlap]

# io instances are automatically converted to base64
assert await transform({"foo": io.StringIO("Hello, world!")}, TypedDictBase64Input, use_async) == {
Expand Down

0 comments on commit 1b2f58e

Please sign in to comment.