summaryrefslogtreecommitdiffstats
path: root/src/test/behave_tests/features/validation_util.py
blob: abe441462074a116c2258a1525a680bb7647ba57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def str_to_list(string):
    """
    Converts the string into list removing whitespaces
    """
    string = string.replace('\t', '\n')
    return [
        [
            key for key in line.split(' ')
            if key != ''
        ]
        for line in string.split('\n')
        if line != ''
    ]


def assert_str_in_list(keyword_list, output_list):
    for keyword in keyword_list:
        assert keyword in output_list, f" Not found {keyword}"