def test_get_project(self): response = getJson('https://{}/resource/dataset/{}/project/{}/'.format( SITE_HOST, p.dataset, p.project)) assert (response.status_code == 200) assert (response.json()['project_name'] == p.project) assert (response.json()['host'] == 'localhost') assert (response.json()['kvengine'] == MYSQL)
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)
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)
def test_public_dataset(self): response = getJson( 'https://{}/resource/public/dataset/'.format(SITE_HOST)) assert (p.dataset in response.json())
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)
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)
def test_get_dataset_error(self): response = getJson('https://{}/resource/dataset/{}/'.format( SITE_HOST, 'foo')) assert (response.status_code == 404)
def test_public_token(self): response = getJson( 'https://{}/resource/public/token/'.format(SITE_HOST)) assert (p.token in response.json())
def test_list_project(self): response = getJson('https://{}/resource/dataset/{}/project/'.format( SITE_HOST, p.dataset)) assert (p.project in response.json())