Esempio n. 1
0
def create_channel(dataset_name, project_name, channel_name, channel_type, channel_datatype, startwindow, endwindow):
  channel = {
      'channel_name' : channel_name,
      'channel_type' : channel_type,
      'channel_datatype' : channel_datatype,
      'startwindow' : startwindow,
      'endwindow' : endwindow
  }
  response = postJson('http://{}/resource/dataset/{}/project/{}/channel/{}/'.format(SITE_HOST, dataset_name, project_name, channel_name), channel)
  assert(response.status_code == 201)
Esempio n. 2
0
 def test_post_channel(self):
     channel = {
         'channel_name': p.channels[0],
         'channel_type': p.channel_type,
         'channel_datatype': p.datatype,
         'startwindow': 0,
         'endwindow': 500
     }
     response = postJson(
         'https://{}/resource/dataset/{}/project/{}/channel/{}/'.format(
             SITE_HOST, p.dataset, p.project, p.channels[0]), channel)
     assert (response.status_code == 201)
Esempio n. 3
0
 def test_post_project(self):
     project = {
         'project_name': p.project,
         'host': 'localhost',
         's3backend': 0,
         'public': 1,
         'kvserver': 'localhost',
         'kvengine': MYSQL
     }
     response = postJson(
         'https://{}/resource/dataset/{}/project/{}'.format(
             SITE_HOST, p.dataset, p.project), project)
     assert (response.status_code == 201)
Esempio n. 4
0
 def test_post_dataset(self):
     dataset = {
         'dataset_name': p.dataset,
         'ximagesize': 2000,
         'yimagesize': 2000,
         'zimagesize': 100,
         'xvoxelres': 1.0,
         'yvoxelres': 2.0,
         'zvoxelres': 1.0,
         'public': 1
     }
     response = postJson(
         'https://{}/resource/dataset/{}/'.format(SITE_HOST, p.dataset),
         dataset)
     assert (response.status_code == 201)
Esempio n. 5
0
 def test_post_token(self):
     token = {'token_name': p.token, 'public': 1}
     response = postJson(
         'https://{}/resource/dataset/{}/project/{}/token/{}/'.format(
             SITE_HOST, p.dataset, p.project, p.token), token)
     assert (response.status_code == 201)