From 8df33f06bc06025cd92771b056314f62e4114982 Mon Sep 17 00:00:00 2001 From: Casey Jao Date: Wed, 29 May 2024 09:19:14 -0400 Subject: [PATCH] Re-enable test --- tests/covalent_tests/workflow/lattice_test.py | 6 ++++-- .../functional_tests/webhook_test.py | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/covalent_tests/workflow/lattice_test.py b/tests/covalent_tests/workflow/lattice_test.py index 2c66925b7..1576f4178 100644 --- a/tests/covalent_tests/workflow/lattice_test.py +++ b/tests/covalent_tests/workflow/lattice_test.py @@ -29,13 +29,14 @@ def test_lattice_draw(mocker, capsys): draw_preview_url = get_ui_url("/preview") + mock_send_draw_req = mocker.patch("covalent_ui.result_webhook.send_draw_request") mock_webbrowser_open = mocker.patch("webbrowser.open") - @ct.electron(executor="local") + @ct.electron def task(x): return x - @ct.lattice(executor="local", workflow_executor="local") + @ct.lattice def workflow(x): return task(x) @@ -47,6 +48,7 @@ def workflow(x): == f"To preview the transport graph of the lattice, visit {draw_preview_url}\n" ) + mock_send_draw_req.assert_called_once() mock_webbrowser_open.assert_called_once() diff --git a/tests/covalent_ui_backend_tests/functional_tests/webhook_test.py b/tests/covalent_ui_backend_tests/functional_tests/webhook_test.py index 25b696f35..50e34e23d 100644 --- a/tests/covalent_ui_backend_tests/functional_tests/webhook_test.py +++ b/tests/covalent_ui_backend_tests/functional_tests/webhook_test.py @@ -70,10 +70,9 @@ async def test_send_update(): assert response is None -@pytest.mark.skip(reason="Test is breaking, need to fix see PR #1728") def test_send_draw_request(): """Test draw request""" - workflow = get_mock_simple_workflow() - lattice = Lattice.deserialize_from_json(workflow.serialize_to_json()) + lattice = get_mock_simple_workflow() + lattice.build_graph(3) response = send_draw_request(lattice) assert response is None