Skip to content

Commit

Permalink
updated pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelPesce committed May 16, 2023
1 parent 519b2a9 commit fdc7d4c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions watertap/ui/tests/test_fsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def test_actions(add_variant: str):
built = False
# garbage = {"trash": True}
garbage = FAKE_FLOWSHEET
m = FAKE_FLOWSHEET
v1 = Var(name="variable1")
v1.construct()
v1.value = 1
Expand All @@ -164,11 +165,13 @@ def test_actions(add_variant: str):
def fake_build():
nonlocal built
built = True
return garbage
nonlocal m
m = build_ro()
return m

def fake_solve(flowsheet=None):
# flowsheet passed in here should be what fake_build() returns
assert flowsheet == FAKE_FLOWSHEET.fs
assert flowsheet == m.fs
return SOLVE_RESULT_OK

def fake_export(flowsheet=None, exports=None):
Expand Down

0 comments on commit fdc7d4c

Please sign in to comment.