diff --git a/alyx/data/tests.py b/alyx/data/tests.py index 5f4cced0..27e58388 100644 --- a/alyx/data/tests.py +++ b/alyx/data/tests.py @@ -253,14 +253,14 @@ def setUp(self): for i, repo in enumerate((repo1, repo2, repo3, repo_main)): if repo.globus_is_personal is False: rel_path = f'{session}/{TestManagementFiles._dataset_uuid_name(d)}' - if i == 0: - rel_path = 'Data2/' + rel_path - if i == 1: - rel_path = '/' + rel_path elif repo.lab != d.session.lab: continue # Don't create file record for dataset if session lab different else: rel_path = f'{session}/{d.name}' + if i == 0: + rel_path = 'Data2/' + rel_path + if i == 1: + rel_path = '/' + rel_path self.records.append( FileRecord.objects.create( relative_path=rel_path, exists=True, dataset=d, data_repository=repo) @@ -280,7 +280,7 @@ def test_get_name_collection_revision(self): expected = { 'lab': '', 'subject': 'subject', 'date': '2020-01-01', 'number': '001', 'collection': '', 'revision': '', 'filename': 'ephysData.raw.ap.bin', - 'full_path': 'subject/2020-01-01/001/ephysData.raw.ap.bin', + 'full_path': 'Data2/subject/2020-01-01/001/ephysData.raw.ap.bin', 'rel_dir_path': 'subject/2020-01-01/001'} self.assertDictEqual(info, expected) relative_path = relative_path.parent / 'alf' / '#2020-10-01#' / relative_path.name diff --git a/alyx/jobs/tests.py b/alyx/jobs/tests.py index a2145c0a..e8900bd3 100644 --- a/alyx/jobs/tests.py +++ b/alyx/jobs/tests.py @@ -119,5 +119,5 @@ def test_cleanup(self): # Error handling self.assertRaises(ValueError, self.command.handle, action='cleanup', status='NotAStatus') - self.assertRaises(ValueError, self.command.handle, action='cleanup', status='-1000') + self.assertRaises(ValueError, self.command.handle, action='cleanup', status='1000') self.assertRaises(ValueError, self.command.handle, action='NotAnAction')