def test_travaso(): tarallo_session = Tarallo(t_url, t_token) test_item = tarallo_session.travaso("schifomacchina", "RamBox") assert test_item item_r69 = tarallo_session.get_item("R69") assert item_r69 is not None assert type(item_r69) == Item assert item_r69.code == 'R69' assert isinstance(item_r69.features, dict) assert item_r69.location == 'RamBox' item_r188 = tarallo_session.get_item("R188") assert item_r188 is not None assert type(item_r188) == Item assert item_r188.code == 'R188' assert isinstance(item_r188.features, dict) assert item_r188.location == 'RamBox' tarallo_session.move("R69", "schifomacchina") tarallo_session.move("R188", "schifomacchina")
def test_travaso(): tarallo_session = Tarallo(t_url, t_token) test_item = tarallo_session.travaso("1", "LabFis4") assert test_item is True item_a2 = tarallo_session.get_item("A2") assert item_a2 is not None assert type(item_a2) == Item assert item_a2.code == 'A2' assert isinstance(item_a2.features, dict) assert item_a2.location == 'LabFis4' item_b1 = tarallo_session.get_item("B1") assert item_b1 is not None assert type(item_b1) == Item assert item_b1.code == 'B1' assert isinstance(item_b1.features, dict) assert item_b1.location == 'LabFis4' tarallo_session.move("A2", "1") tarallo_session.move("B1", "1")
def test_move_item_not_existing(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.move("INVALID", 'schifomaccchina')
def test_move_item(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.move("R111", 'schifomacchina')
def test_move_item_impossible(): tarallo_session = Tarallo(t_url, t_token) # Invalid nesting, cannot place a RAM inside a CPU assert tarallo_session.move("R200", "C1")
def test_move_item_not_existing_location(): tarallo_session = Tarallo(t_url, t_token) assert not tarallo_session.move("R200", "INVALID")
def test_move_item_not_existing(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.move("INVALID", "B103")
def test_move_item(): tarallo_session = Tarallo(t_url, t_token) assert tarallo_session.move("R111", "B30") is True