def test_get_id_from_id_item_when_receive_id_item(): item = '@trello-1234' serializer = TrelloCardSerializer() result = serializer.get_id_from_id_item(item) assert result == '1234'
def test_get_id_from_id_item_when_not_receive_id_item(): item = '' serializer = TrelloCardSerializer() with pytest.raises(IndexError): serializer.get_id_from_id_item(item)