blob: bcdf04b21b5667fefcbaeb66653a6fa1743923fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import pytest
from uploader import create_folders
@pytest.fixture
def nxc(mocker):
return mocker.MagicMock()
@pytest.mark.parametrize("path,folders", [
("folder1", ["/folder1"]),
("folder1/folder2", ["/folder1", "/folder1/folder2"]),
("/folder1/folder2", ["/folder1", "/folder1/folder2"])
])
def test_create_folders(nxc, path, folders):
create_folders(path, nxc)
for call, folder in zip(nxc.method_calls, folders):
assert folder == call.args[0]
|