Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
rbavery committed Feb 26, 2024
1 parent 54a52fa commit 41cf8ea
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import tempfile

import pytest

Expand All @@ -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"

0 comments on commit 41cf8ea

Please sign in to comment.