def test_get_not_found_must_raise(self): h1 = Host(0, "n") s1 = Storage(1, "n") p = Platform([h1, s1]) with pytest.raises(LookupError) as excinfo: p.get(2) assert "no resources" in str(excinfo.value)
def test_get_with_storage(self): h1 = Host(0, "n") s1 = Storage(1, "n") p = Platform([h1, s1]) assert p.get(1) == s1