def test_should_ignore_special_characters(self): assert list(parse_keyword_str('-')) == [] assert list(parse_keyword_str('.')) == []
def test_should_ignore_special_digits(self): assert list(parse_keyword_str('1')) == []
def test_should_remove_xml_encoding(self): assert list(parse_keyword_str('this is "quoted"')) == [ 'this is "quoted"' ]
def test_should_ignore_na_upper_and_lower_case(self): assert list(parse_keyword_str('N/A')) == [] assert list(parse_keyword_str('n/a')) == []
def test_should_not_include_empty_keywords(self): assert list(parse_keyword_str(' , '.join( (KEYWORD_1, '')))) == [KEYWORD_1]
def test_should_strip_space_around_keywords(self): assert list(parse_keyword_str(' , '.join( (KEYWORD_1, KEYWORD_2)))) == [KEYWORD_1, KEYWORD_2]
def test_should_parse_multiple_keyword_separated_by_comma(self): assert list(parse_keyword_str(','.join( (KEYWORD_1, KEYWORD_2)))) == [KEYWORD_1, KEYWORD_2]
def test_should_return_list_with_single_keyword(self): assert list(parse_keyword_str(KEYWORD_1)) == [KEYWORD_1]
def test_should_return_empty_list_if_string_is_empty(self): assert list(parse_keyword_str('')) == []