<s> from st2tests . base import BaseActionTestCase <EOL> from parse_csv import ParseCSVAction <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> MOCK_DATA_1 = """<STR_LIT>""" . strip ( ) <EOL> MOCK_DATA_2 = """<STR_LIT>""" . strip ( ) <EOL> class ParseCSVActionTestCase ( BaseActionTestCase ) : <EOL> action_cls = ParseCSVAction <EOL> def test_run_comma_delimiter ( self ) : <EOL> result = self . get_action_instance ( ) . run ( data = MOCK_DATA_1 , delimiter = '<STR_LIT:U+002C>' ) <EOL> expected = [ <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ] <EOL> self . assertEqual ( result , expected ) <EOL> def test_run_pipe_delimiter ( self ) : <EOL> result = self . get_action_instance ( ) . run ( data = MOCK_DATA_2 , delimiter = '<STR_LIT:|>' ) <EOL> expected = [ <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ] <EOL> self . assertEqual ( result , expected ) </s>
