one.tests.test_converters

Tests for the one.converters module

Classes

TestAlyx2Path

TestConverters

TestOnlineConverters

Currently these methods hit the /docs endpoint

TestWrappers

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

Bases: unittest.case.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_eid2path()[source]
test_path2record()[source]
test_is_exp_ref()[source]
test_ref2dict()[source]
test_dict2ref()[source]
test_path2ref()[source]
test_ref2path()[source]
class TestOnlineConverters(methodName='runTest')[source]

Bases: unittest.case.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_record2url()[source]
test_record2path()[source]
test_ref2dj()[source]
class TestAlyx2Path(methodName='runTest')[source]

Bases: unittest.case.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': [{'id': 'c9ae1b6e-03a6-41c9-9e1b-4a7f9b5cfdbf', 'data_repository': 'ibl_floferlab_SR', 'data_repository_path': '/mnt/s0/Data/Subjects/', 'relative_path': 'SWC_014/2019-12-11/001/alf/probe00/channels.localCoordinates.npy', 'data_url': None, 'exists': True}, {'id': 'f434a638-bc61-4695-884e-70fd1e521d60', 'data_repository': 'flatiron_hoferlab', 'data_repository_path': '/hoferlab/Subjects/', 'relative_path': 'SWC_014/2019-12-11/001/alf/probe00/channels.localCoordinates.npy', '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}], '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]
class TestWrappers(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_recurse()[source]