1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

Support zone black and whitelists

This commit is contained in:
Ondřej Caletka
2018-07-18 13:45:39 +02:00
parent 74cf107023
commit 23b661b1c7
2 changed files with 43 additions and 2 deletions

View File

@ -293,3 +293,15 @@ def test_template_config(git_dir):
assert output.startswith("# Managed by dzonegit")
assert " - zone: \"dummy\"\n file: \"" in output
assert output.endswith("# This is the end")
output = dzonegit.template_config(
str(git_dir),
template,
whitelist=set("a"),
)
assert " - zone: \"dummy\"\n file: \"" not in output
def test_load_set_file(git_dir):
git_dir.join("dummy").write("dummy\n\n # Comment")
s = dzonegit.load_set_file("dummy")
assert s == {"dummy"}