def test_unauthorized(): with pytest.raises(exceptions.Unauthorized): api = NassApi('') api.param_values('source_desc')
def test_network_error(api): with pytest.raises(exceptions.NetworkException): api.BASE_URL = 'http://somefakedomainname' api.param_values('source_desc')
def test_network_error(api): with pytest.raises(exceptions.NetworkException): api.BASE_URL = "http://somefakedomainname" api.param_values("source_desc")
def test_unauthorized(): with pytest.raises(exceptions.Unauthorized): api = NassApi("") api.param_values("source_desc")
def test_sources(api): data = api.param_values('source_desc') assert data