def timeseries(client, dataset): # create ts = TimeSeries('Human EEG') assert not ts.exists dataset.add(ts) assert ts.exists assert ts in dataset assert ts.type == 'TimeSeries' assert ts.name == 'Human EEG' ts2 = client.get(ts.id) assert ts2.id == ts.id assert ts2.name == ts.name assert ts2.type == 'TimeSeries' del ts2 # provide to other tests yield ts # update ts: change name ts.name = 'Monkey EEG' ts.update() ts2 = client.get(ts.id) assert ts2.id == ts.id assert ts2.name == ts.name assert ts2.type == 'TimeSeries' # streaming credentials cred = ts.streaming_credentials() assert cred # remove dataset.remove(ts) assert not ts.exists assert ts not in dataset
def timeseries(client, dataset): # create ts = TimeSeries('Human EEG') assert not ts.exists dataset.add(ts) assert ts.exists assert ts in dataset assert ts.type == 'TimeSeries' assert ts.name.startswith( 'Human EEG') #starts with bc duplicate names are appended ts2 = client.get(ts.id) assert ts2.id == ts.id assert ts2.name == ts.name assert ts2.type == 'TimeSeries' del ts2 # provide to other tests yield ts # streaming credentials cred = ts.streaming_credentials() assert cred # remove dataset.remove(ts) assert not ts.exists assert ts not in dataset