diff --git a/tests/test_schema.py b/tests/test_schema.py index 4e2d387..8259cb0 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -1,5 +1,3 @@ -import os -import tempfile import pytest @@ -12,11 +10,5 @@ def metadata_json(): def test_model_metadata_json_operations(metadata_json): from stac_model.schema import MLModel - with tempfile.TemporaryDirectory() as temp_dir: - temp_filepath = os.path.join(temp_dir, "tempfile.json") - with open(temp_filepath, "w") as file: - file.write(metadata_json) - with open(temp_filepath) as json_file: - json_str = json_file.read() - model_metadata = MLModel.model_validate_json(json_str) + model_metadata = MLModel.model_validate_json(metadata_json) assert model_metadata.name == "Resnet-18 Sentinel-2 ALL MOCO"