예제 #1
0
def test_parse_received_doc_data():
    helper = ConfigdocsHelper(CTX)
    yaml = """
---
document1:
    - a
    - b
    - c
---
document2:
    - 1
    - 2
    - 3
...
"""
    parsed = helper.parse_received_doc_data(yaml)
    assert type(parsed) == list
    assert len(parsed) == 2
예제 #2
0
def test_parse_received_doc_data_bad_yaml():
    helper = ConfigdocsHelper(CTX)
    yaml = "--- asdfjklsemicolon:"
    parsed = helper.parse_received_doc_data(yaml)
    assert type(parsed) == list
    assert len(parsed) == 0