def test_resource_show(): results = get.resource_search(client=client.Client(), query="name:csv") assert results["success"] is True if results["result"]["count"] > 0: res_orig = results["result"]["results"][0] try: res_show = get.resource_show(client=client.Client(), id=res_orig["id"]) assert results["success"] is True assert res_show["id"] == res_orig["id"] except exceptions.CKANError, e: if str(e.type).lower().find("auth") >= 0: return else: raise exceptions.CKANError(e)
def test_resource_show(): results = get.resource_search(client=client.Client(), query='name:csv') assert results['success'] is True if results['result']['count'] > 0: res_orig = results['result']['results'][0] try: res_show = get.resource_show(client=client.Client(), id=res_orig['id']) assert results['success'] is True assert res_show['id'] == res_orig['id'] except exceptions.CKANError, e: if str(e.type).lower().find('auth') >= 0: return else: raise exceptions.CKANError(e)
def test_resource_show(): res_show = get.resource_show(id='blah')