def test_restore_item(): tarallo_session = Tarallo(t_url, t_token) tarallo_session.remove_item('R242') assert tarallo_session.restore_item('R242', 'schifomacchina')
def test_remove_invalid_item(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.remove_item('invalid') is None
def test_restore_item(): tarallo_session = Tarallo(t_url, t_token) tarallo_session.remove_item('R242') assert tarallo_session.restore_item('R242', 'B115') is True
def test_remove_with_content(): tarallo_session = Tarallo(t_url, t_token) # This fails because deleting items is like "rm", not "rm -r" assert not tarallo_session.remove_item('schifomacchina')
def test_remove_item_twice(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.remove_item('R223') is True assert tarallo_session.remove_item('R223') is True tarallo_session.restore_item('R223', 'B115')