'Test include yaml.'

def test_include_yaml(self):

    with patch_yaml_files({'test.yaml': 'value'}):
        conf = 'key:    !include    test.yaml'
        with io.StringIO(conf) as file:
            doc = yaml.yaml.safe_load(file)
            assert (doc['key'] == 'value')
    with patch_yaml_files({'test.yaml': None}):
        conf = 'key:    !include    test.yaml'
        with io.StringIO(conf) as file:
            doc = yaml.yaml.safe_load(file)
            assert (doc['key'] == {})
