Skip to content
Snippets Groups Projects
Commit 3408a7a0 authored by Felix Kleinert's avatar Felix Kleinert
Browse files

upate testst for get_host (#106)

parent 5d3248f1
No related branches found
No related tags found
3 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!97Felix issue106 hpc modules for juwels
Pipeline #33834 passed
...@@ -129,8 +129,16 @@ class TestTimeTracking: ...@@ -129,8 +129,16 @@ class TestTimeTracking:
class TestGetHost: class TestGetHost:
def test_get_host()
assert prepare_host() == 'root' @mock.patch("socket.gethostname", side_effect=["linux-aa9b", "ZAM144", "zam347", "jrtest", "jwtest",
"runner-6HmDp9Qd-project-2411-concurrent"])
def test_get_host(self, mock_host):
assert get_host() == "linux-aa9b"
assert get_host() == "ZAM144"
assert get_host() == "zam347"
assert get_host() == "jrtest"
assert get_host() == "jwtest"
assert get_host() == "runner-6HmDp9Qd-project-2411-concurrent"
class TestPrepareHost: class TestPrepareHost:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment