How to use the ndlib.restutil.getJson function in ndlib

To help you get started, we’ve selected a few ndlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_project_error(self):
    response = getJson('https://{}/resource/dataset/{}/project/{}/'.format(SITE_HOST, p.dataset, 'foo'))
    assert(response.status_code == 404)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_list_project(self):
    response = getJson('https://{}/resource/dataset/{}/project/'.format(SITE_HOST, p.dataset))
    assert(p.project in response.json())
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_token(self):
    response = getJson('https://{}/resource/dataset/{}/project/{}/token/{}/'.format(SITE_HOST, p.dataset, p.project, 'foo'))
    assert(response.status_code == 404)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_public_dataset(self):
    response = getJson('https://{}/resource/public/dataset/'.format(SITE_HOST))
    assert(p.dataset in response.json())
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_dataset_error(self):
    response = getJson('https://{}/resource/dataset/{}/'.format(SITE_HOST, 'foo'))
    assert(response.status_code == 404)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_dataset(self):
    response = getJson('https://{}/resource/dataset/{}/'.format(SITE_HOST, p.dataset))
    assert(response.status_code == 200)
    assert(response.json()['dataset_name'] == p.dataset)
    assert(response.json()['ximagesize'] == 2000)
    assert(response.json()['xvoxelres'] == 1.0)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_channel_error(self):
    response = getJson('https://{}/resource/dataset/{}/project/{}/channel/{}/'.format(SITE_HOST, p.dataset, p.project, 'foo'))
    assert(response.status_code == 404)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_channel(self):
    response = getJson('https://{}/resource/dataset/{}/project/{}/channel/{}/'.format(SITE_HOST, p.dataset, p.project, p.channels[0]))
    assert(response.status_code == 200)
    assert(response.json()['channel_name'] == p.channels[0])
    assert(response.json()['channel_type'] == p.channel_type)
    assert(response.json()['channel_datatype'] == p.datatype)
    assert(response.json()['startwindow'] == 0)
    assert(response.json()['endwindow'] == 500)
github neurodata / ndstore / test / test_resource.py View on Github external
def test_list_dataset(self):
    response = getJson('https://{}/resource/dataset/'.format(SITE_HOST))
    assert(p.dataset in response.json())
github neurodata / ndstore / test / test_resource.py View on Github external
def test_get_token(self):
    response = getJson('https://{}/resource/dataset/{}/project/{}/token/{}/'.format(SITE_HOST, p.dataset, p.project, p.token))
    assert(response.status_code == 200)
    assert(response.json()['token_name'] == p.token)