|
5 | 5 | import pytest |
6 | 6 |
|
7 | 7 | from pathlib import Path |
8 | | -from dmu import FCopy, FCopyConf |
| 8 | +from dmu import FCopy |
9 | 9 |
|
10 | 10 | from dmu.logging.log_store import LogStore |
11 | 11 |
|
@@ -63,12 +63,22 @@ def test_local(tmp_path) -> None: |
63 | 63 | # ---------------------- |
64 | 64 | def test_remote_target(tmp_path) -> None: |
65 | 65 | ''' |
66 | | - Test for transfer between from remote server |
| 66 | + Files are in a local server, copy them remotely |
67 | 67 | ''' |
68 | 68 | l_source = _make_paths(dir=tmp_path / 'source', make_file= True, number=10) |
69 | 69 | l_target = _make_paths(dir=tmp_path / 'target', make_file=False, number=10) |
70 | 70 |
|
71 | | - cfg = FCopyConf(target='acampove@localhost') |
72 | | - fcp = FCopy(cfg=cfg) |
| 71 | + fcp = FCopy(target='acampove@localhost') |
| 72 | + for source, target in zip(l_source, l_target): |
| 73 | + fcp.copy(source=source, target=target) |
| 74 | +# ---------------------- |
| 75 | +def test_remote_source(tmp_path) -> None: |
| 76 | + ''' |
| 77 | + Files are in a remote server, copy them locally |
| 78 | + ''' |
| 79 | + l_source = _make_paths(dir=tmp_path / 'source', make_file= True, number=10) |
| 80 | + l_target = _make_paths(dir=tmp_path / 'target', make_file=False, number=10) |
| 81 | + |
| 82 | + fcp = FCopy(source='acampove@localhost') |
73 | 83 | for source, target in zip(l_source, l_target): |
74 | 84 | fcp.copy(source=source, target=target) |
0 commit comments