Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kessler-frost committed Oct 18, 2023
1 parent 8d48180 commit 4a1ef38
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions covalent_dispatcher/_core/runner_modules/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from covalent._shared_files import logger
from covalent._shared_files.util_classes import Status
from covalent_dispatcher._core import data_manager as datamgr
from covalent_dispatcher._core.data_modules import lattice as lattice_query_module

from .. import data_manager as datasvc
from ..data_modules import job_manager
Expand Down Expand Up @@ -59,7 +59,7 @@ async def get_version_info(dispatch_id: str, task_id: int):
{"python": python_version, "covalent": covalent_version}
"""

data = await datamgr.lattice.get(dispatch_id, ["python_version", "covalent_version"])
data = await lattice_query_module.get(dispatch_id, ["python_version", "covalent_version"])

return {
"python": data["python_version"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
return result_object.lattice.transport_graph.get_incoming_edges(node_id)

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand All @@ -168,7 +168,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
result_object = get_mock_srvresult(sdkres, test_db)

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand All @@ -192,7 +192,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
tg.set_node_value(2, "output", ct.TransportableObject(2))

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand All @@ -202,7 +202,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
assert task_inputs["args"] == [0, 2]

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand All @@ -212,7 +212,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
assert task_inputs["args"] == [2, 0]

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand All @@ -221,7 +221,7 @@ async def mock_get_incoming_edges(dispatch_id, node_id):
)
assert task_inputs["args"] == [2, 0]
mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_incoming_edges",
"covalent_dispatcher._core.dispatcher.tg_utils.get_incoming_edges",
mock_get_incoming_edges,
)

Expand Down Expand Up @@ -253,7 +253,7 @@ async def electron_get(dispatch_id, node_id, keys):
return {keys[0]: node_id}

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_node_successors",
"covalent_dispatcher._core.dispatcher.tg_utils.get_node_successors",
get_node_successors,
)

Expand Down Expand Up @@ -307,7 +307,7 @@ async def get_graph_nodes_links(dispatch_id: str) -> dict:
return nx.readwrite.node_link_data(g)

mocker.patch(
"covalent_dispatcher._core.data_manager.graph.get_nodes_links",
"covalent_dispatcher._core.dispatcher.tg_utils.get_nodes_links",
side_effect=get_graph_nodes_links,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def test_get_version_info(mocker):
mock_ver_info = {"python_version": "3.10", "covalent_version": "0.220"}

mocker.patch(
"covalent_dispatcher._core.runner_modules.jobs.datamgr.lattice.get",
"covalent_dispatcher._core.runner_modules.jobs.lattice_query_module.get",
return_value=mock_ver_info,
)
assert await jobs.get_version_info(dispatch_id, 0) == {"python": "3.10", "covalent": "0.220"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def workflow(x):
json_lattice = workflow.serialize_to_json()
dispatch_id = "asdf"
lattice = Lattice.deserialize_from_json(json_lattice)
result_object = Result(lattice, lattice.metadata["results_dir"])
result_object = Result(lattice, dispatch_id)
result_object._dispatch_id = dispatch_id
result_object._initialize_nodes()

Expand Down

0 comments on commit 4a1ef38

Please sign in to comment.