Skip to content

Commit

Permalink
added tests for loading fixture into model
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleon95 committed Oct 10, 2024
1 parent 92a90a5 commit cc6f654
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Empty file.
16 changes: 16 additions & 0 deletions shared-data/python/tests/liquid_classes/test_load_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json

from opentrons_shared_data import load_shared_data
from opentrons_shared_data.liquid_classes.liquid_class_definition import (
LiquidClassSchemaV1,
)


def test_load_liquid_class_schema_v1() -> None:
fixture_data = load_shared_data("liquid-class/fixtures/fixture_glycerol50.json")
liquid_class_model = LiquidClassSchemaV1.parse_raw(fixture_data)
liquid_class_def_from_model = json.loads(
liquid_class_model.json(exclude_unset=True)
)
expected_liquid_class_def = json.loads(fixture_data)
assert liquid_class_def_from_model == expected_liquid_class_def

0 comments on commit cc6f654

Please sign in to comment.