def test_get_id_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 = '1234' result = serializer.get_id(item) assert result == expected_result
def test_get_id_when_params_is_empty(): item = '' serializer = TrelloCardSerializer() with pytest.raises(IndexError): serializer.get_id(item)