one.tests.test_converters

Unit tests for the one.converters module

Classes

TestAlyx2Path

TestConverters

TestOnlineConverters

Currently these methods hit the /docs endpoint

TestWrappers

class TestConverters(methodName='runTest')[source]

Bases: TestCase

tempdir = None
classmethod setUpClass() None[source]

Hook method for setting up class fixture before running tests in the class.

test_to_eid()[source]
test_path2eid()[source]

Test for ConversionMixin.path2eid (offline mode)

test_eid2path()[source]

Test for ConversionMixin.eid2path

test_eid2ref()[source]
test_path2record()[source]

Tests for ConversionMixin.path2record method

test_is_exp_ref()[source]
test_ref2dict()[source]
test_dict2ref()[source]
test_path2ref()[source]
test_ref2path()[source]
class TestOnlineConverters(methodName='runTest')[source]

Bases: TestCase

Currently these methods hit the /docs endpoint

classmethod setUpClass() None[source]

Hook method for setting up class fixture before running tests in the class.

test_to_eid()[source]

Test for ConversionMixin.to_eid

test_record2url()[source]

Test for ConversionMixin.record2url

test_record2path()[source]

Test for ConversionMixin.record2path

test_eid2path()[source]

Test for OneAlyx.eid2path

test_path2eid()[source]

Test for OneAlyx.path2eid method.

test_pid2eid()[source]

Test for OneAlyx.pid2eid method.

test_eid2pid()[source]

Test for OneAlyx.eid2pid method.

class TestAlyx2Path(methodName='runTest')[source]

Bases: TestCase

dset = {'auto_datetime': '2021-02-10T20:24:31.484939', 'collection': 'alf/probe00', 'created_by': 'nate', 'created_datetime': '2020-02-07T22:08:08.053982', 'data_format': 'npy', 'dataset_type': 'channels.localCoordinates', 'experiment_number': 1, 'file_records': [{'data_repository': 'ibl_floferlab_SR', 'data_repository_path': '/mnt/s0/Data/Subjects/', 'data_url': None, 'exists': True, 'id': 'c9ae1b6e-03a6-41c9-9e1b-4a7f9b5cfdbf', 'relative_path': 'SWC_014/2019-12-11/001/alf/probe00/channels.localCoordinates.npy'}, {'data_repository': 'flatiron_hoferlab', 'data_repository_path': '/hoferlab/Subjects/', 'data_url': 'https://ibl.flatironinstitute.org/hoferlab/Subjects/SWC_014/2019-12-11/001/alf/probe00/channels.localCoordinates.00059298-1b33-429c-a802-fa51bb662d72.npy', 'exists': True, 'id': 'f434a638-bc61-4695-884e-70fd1e521d60', 'relative_path': 'SWC_014/2019-12-11/001/alf/probe00/channels.localCoordinates.npy'}], 'file_size': 6064, 'hash': 'bc74f49f33ec0f7545ebc03f0490bdf6', 'name': 'channels.localCoordinates.npy', 'session': 'https://alyx.internationalbrainlab.org/sessions/7cffad38-0f22-4546-92b5-fd6d2e8b2be9', 'url': 'https://alyx.internationalbrainlab.org/datasets/00059298-1b33-429c-a802-fa51bb662d72', 'version': '1.5.36'}
test_dsets_2_path()[source]
test_session_record2path()[source]

Test for one.converters.session_record2path

class TestWrappers(methodName='runTest')[source]

Bases: TestCase

test_recurse()[source]
test_parse_values()[source]