Skip to content

Commit baeac8f

Browse files
ilaifMidnighter
andcommitted
test: make case about workspace and not model
Co-authored-by: Midnighter <[email protected]>
1 parent c97f8e0 commit baeac8f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_integration/test_workspace_io.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from pydantic import ValidationError
2424

2525
from structurizr import Workspace, WorkspaceIO
26-
from structurizr.model import ModelIO
2726

2827

2928
DEFINITIONS = Path(__file__).parent / "data" / "workspace_definition"
@@ -65,5 +64,7 @@ def test_serialize_workspace(example, filename, monkeypatch):
6564
monkeypatch.syspath_prepend(EXAMPLES)
6665
example = import_module(example)
6766
path = DEFINITIONS / filename
68-
expected = ModelIO.from_orm(Workspace.load(path).model)
69-
assert ModelIO.from_orm(example.main().model) == expected
67+
# TODO (midnighter): Use `from_orm` like `.construct` bypassing validation. (
68+
# Requires a pull request on pydantic.)
69+
expected = WorkspaceIO.from_orm(Workspace.load(path))
70+
assert WorkspaceIO.from_orm(example.main()) == expected

0 commit comments

Comments
 (0)