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
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