Exemple #1
0
def test_get_name_when_params_is_empty():
    key = ''
    item = ''
    serializer = TrelloCardSerializer()

    with pytest.raises(IndexError):
        serializer.get_name(key, item)
Exemple #2
0
def test_get_name_when_receive_params():
    key = 'candy.feature'
    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 = '[candy] example'

    result = serializer.get_name(key, item)

    assert result == expected_result