1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +00:00

Fix pytests

This commit is contained in:
Jörn-Michael Miehe 2021-12-02 17:32:55 +01:00
parent fe10bbb33b
commit c8b69c73a9
3 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ class TestDefault:
def test_example(self): def test_example(self):
p = Project( p = Project(
directory=Path("example/hello-world.project"), directory=Path("example/hello-world.project"),
parent=None,
) )
ss = p.services ss = p.services
@ -30,6 +31,7 @@ class TestDefault:
def test_empty(self): def test_empty(self):
p = Project( p = Project(
directory=Path("nonexistent"), directory=Path("nonexistent"),
parent=None,
) )
with pytest.raises(FileNotFoundError) as exc_info: with pytest.raises(FileNotFoundError) as exc_info:

View file

@ -10,6 +10,7 @@ class TestDefault:
s = Service( s = Service(
name="s", name="s",
content=CommentedMap(), content=CommentedMap(),
parent=None,
) )
assert s.name == "s" assert s.name == "s"
@ -21,6 +22,7 @@ class TestDefault:
content=CommentedMap({ content=CommentedMap({
"image": "repo/image:tag", "image": "repo/image:tag",
}), }),
parent=None,
) )
assert s.name == "s" assert s.name == "s"
@ -37,6 +39,7 @@ class TestDefault:
"$TARGETDIR/other/dir:/path/to/other/mountpoint", "$TARGETDIR/other/dir:/path/to/other/mountpoint",
] ]
}), }),
parent=None,
) )
assert s.name == "s" assert s.name == "s"
@ -52,6 +55,7 @@ class TestDefault:
"$CONFDIR/other/config:/path/to/other/config", "$CONFDIR/other/config:/path/to/other/config",
] ]
}), }),
parent=None,
) )
assert s.name == "s" assert s.name == "s"

View file

@ -9,6 +9,7 @@ class TestServices:
s = Service( s = Service(
name="s", name="s",
content=CommentedMap(), content=CommentedMap(),
parent=None,
) )
ss = Services([s]) ss = Services([s])