예제 #1
0
def test_get_dumper():
    """
    When invoking get_dumper use clean_up & long_form
    :return: LongCleanDumper
    """
    resp = cfn_flip.get_dumper(clean_up=True, long_form=True)
    assert resp == cfn_flip.yaml_dumper.LongCleanDumper
def dump_yaml(data, clean_up=False, long_form=False):
    """
    Output some YAML
    """

    return yaml.dump(data,
                     Dumper=get_dumper(clean_up, long_form),
                     default_flow_style=False,
                     allow_unicode=True)