mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
Blob: Add validator and use future annotations (#3650)
Minor changes to the Blob schema. --------- Co-authored-by: Zander Chase <130414180+vowelparrot@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,15 @@ def test_mime_type_inference(
|
||||
assert blob.mimetype == expected_mime_type
|
||||
|
||||
|
||||
def test_blob_initialization_validator() -> None:
|
||||
"""Test that blob initialization validates the arguments."""
|
||||
with pytest.raises(ValueError, match="Either data or path must be provided"):
|
||||
Blob()
|
||||
|
||||
assert Blob(data=b"Hello, World!") is not None
|
||||
assert Blob(path="some_path") is not None
|
||||
|
||||
|
||||
def test_blob_loader() -> None:
|
||||
"""Simple test that verifies that we can implement a blob loader."""
|
||||
|
||||
|
Reference in New Issue
Block a user