Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
khk-globus committed Sep 4, 2024
1 parent bc56f4b commit 59889bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions compute_endpoint/tests/unit/test_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,15 @@ def test_gcmpiengine_default_executor(randomstring):
assert k["encrypted"] is True, "Expect encrypted by default"


def test_gcmpiengine_accepts_resource_specification(task_uuid):
def test_gcmpiengine_accepts_resource_specification(task_uuid, randomstring):
spec = {"some": "conf", "sentinel": randomstring()}
with mock.patch.object(GlobusMPIEngine, "_ExecutorClass") as mock_ex:
mock_ex.__name__ = "ClassName"
mock_ex.return_value = mock.Mock(launch_cmd="")
engine = GlobusMPIEngine()
engine.submit(
str(task_uuid), b"some task", resource_specification={"some": "conf"}
)
engine.submit(str(task_uuid), b"some task", resource_specification=spec)

assert engine.executor.submit.called, "Verify test: correct internal method invoked"

a, _k = engine.executor.submit.call_args
assert spec in a

0 comments on commit 59889bd

Please sign in to comment.