def test_feature_to_array_when_param_is_empty(): item = '' serializer = TrelloCardSerializer() expected_result = [] result = serializer.feature_to_array(item) assert result == expected_result
def test_description_exists_is_false_when_description_not_exists(): serializer = TrelloCardSerializer() item = serializer.feature_to_array('''\nFeature: example\n\n @trello-1234\n\n\n Scenario:\n\n Given i like to boogie\n\n\n''') expected_result = False result = serializer.description_exists(item) assert result == expected_result
def test_feature_to_array_when_receive_params(): item = '''\nFeature: example\n\nSmall description\n\n @trello-1234\n\n\n Scenario:\n\n Given i like to boogie\n\n\n''' serializer = TrelloCardSerializer() expected_result = ['Feature: example', 'Small description'] expected_result.extend([' @trello-1234', ' Scenario:']) expected_result.extend([' Given i like to', ' boogie']) result = serializer.feature_to_array(item) assert result == expected_result