Commit 5828f4a4 authored by Willi Rath's avatar Willi Rath

Merge branch 'develop' into 'master'

Fix typo and add test for the typo

See merge request !47
parents 2e1216fd 8deb73af
......@@ -223,7 +223,7 @@ class WgetRecursive(Renderer):
def __init__(self, yaml_dict=None, *args, **kwargs):
"""Construct `accept_files_string` and `exclude_directories_string`."""
if "accept_files" not in yaml_dict:
yaml_dct["accept_files_string"] = ""
yaml_dict["accept_files_string"] = ""
else:
yaml_dict["accept_files_string"] = (
" --accept \"{}\"".format(yaml_dict["accept_files"])
......
......@@ -16,7 +16,7 @@ def test_curl_single_file_rendering():
assert renderer.__str__ == target_string
def test_wget_recursive_rendering_with_excluded_dirs():
def test_wget_recursive_rendering_with_excluded_dirs_and_accept_files():
yaml_dict = {"prefix": "pref", "cut_dirs": 77, "url": "http://url",
"accept_files": "*.*", "exclude_directories": "/asdf,/zxcv/a"}
target_string = ("wget -nv -r -c -np -nH --cut-dirs=77 "
......@@ -26,11 +26,10 @@ def test_wget_recursive_rendering_with_excluded_dirs():
assert renderer.__str__ == target_string
def test_wget_recursive_rendering_without_excluded_dirs():
yaml_dict = {"prefix": "pref", "cut_dirs": 77, "url": "http://url",
"accept_files": "*.*"}
def test_wget_recursive_rendering_without_excluded_dirs_and_accept_files():
yaml_dict = {"prefix": "pref", "cut_dirs": 77, "url": "http://url"}
target_string = ("wget -nv -r -c -np -nH --cut-dirs=77 "
"--accept \"*.*\" -P \"pref\" \"http://url\"\n")
"-P \"pref\" \"http://url\"\n")
renderer = data_repo_renderer.WgetRecursive(yaml_dict=yaml_dict)
assert renderer.__str__ == target_string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment