WEEE-Open / pytarallo

Python T.A.R.A.L.L.O. API
MIT License
2 stars 4 forks source link

Tests not working #46

Closed morpheusthewhite closed 4 years ago

morpheusthewhite commented 4 years ago

The latest version of T.A.R.A.L.L.O. (https://github.com/WEEE-Open/tarallo/commit/362d3697c18ac21300939071a45f61db834333ff) misses many items referenced in the test.py which are asserted to be existing. One example from the test file

def test_get_item():
    tarallo_session = Tarallo(t_url, t_token)
    item = tarallo_session.get_item('1')
    assert item is not None
    assert type(item) == Item
    assert item.code == '1'
    assert isinstance(item.features, dict)
    assert item.features["type"] == "case"
    assert item.path[-2:-1][0] == "Polito"
    assert item.path[-1:][0] == "Magazzino"
    assert item.location == "Magazzino"
lvps commented 4 years ago

@morpheusthewhite Yes we need to correct the tests, really. If any type of item does not exist at all, we can add it to the examples shipped with tarallo

morpheusthewhite commented 4 years ago

Or replace the ones referenced in the pytarallo with existing ones