Skip to content
Snippets Groups Projects
Commit 7ff8127c authored by lukas leufen's avatar lukas leufen
Browse files

move mock into if statement

parent 5c778fc6
Branches
Tags v0.8.2
3 merge requests!17update to v0.4.0,!15new feat split subsets,!13fix bug make tests running
Pipeline #26151 passed
......@@ -168,8 +168,8 @@ class TestPrepareHost:
with pytest.raises(OSError) as e:
prepare_host()
assert "unknown host 'NotExistingHostName'" in e.value.args[0]
mock_host.return_value = "linux-gzsx"
if "runner-6HmDp9Qd-project-2411-concurrent" not in socket.gethostname():
mock_host.return_value = "linux-gzsx"
with pytest.raises(NotADirectoryError) as e:
prepare_host()
assert "does not exist for host 'linux-gzsx'" in e.value.args[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment