add unit tests

This commit is contained in:
Muayyad alsadi
2022-02-26 03:10:35 +03:00
parent 064521255b
commit 4f025679cf
2 changed files with 22 additions and 2 deletions

19
pytests/test_volumes.py Normal file
View File

@@ -0,0 +1,19 @@
import pytest
from podman_compose import parse_short_mount
@pytest.fixture
def multi_propagation_mount_str():
return "/foo/bar:/baz:U,Z"
def test_parse_short_mount_multi_propagation(multi_propagation_mount_str):
expected = {
"type": "bind",
"source": "/foo/bar",
"target": "/baz",
"bind": {
"propagation": "U,Z",
},
}
assert parse_short_mount(multi_propagation_mount_str, "/") == expected