Browse Source

Add a test to ensure !include files use the same loader (settings)

pull/1315/head
Ross McFarland 2 months ago
parent
commit
6654d13ba2
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      octodns/yaml.py
  2. +3
    -1
      tests/config/include/dict_too.yaml

+ 1
- 1
octodns/yaml.py View File

@ -38,7 +38,7 @@ class ContextLoader(SafeLoader):
def load_file(filename):
filename = join(directory, filename)
with open(filename, 'r') as fh:
return safe_load(fh, self.__class__)
return load(fh, self.__class__)
if not isinstance(node.value, list):
# single filename, just load and return whatever is in it


+ 3
- 1
tests/config/include/dict_too.yaml View File

@ -1,3 +1,5 @@
---
foo: bar
z: 43
# keys are intentionally out of order here to ensure !include files are loaded
# with the same laoder class and thus "settings" as their parent
foo: bar

Loading…
Cancel
Save