diff --git a/tests/test_belleii.py b/tests/test_belleii.py index 2f2c07cc9c..47593ff014 100644 --- a/tests/test_belleii.py +++ b/tests/test_belleii.py @@ -131,7 +131,7 @@ def test_belle2_schema(rse_factory, did_factory, root_account, did_client): validate_schema('did', {'name': name, 'scope': scope, 'type': 'CONTAINER'}) @skip_non_belleii -def test_upload_file_with_dirac(rse_factory, scope, rse_client, did_factory, download_client, did_client, file_factory): +def test_upload_file_with_dirac(rse_factory, rse_client, did_factory, download_client, did_client, file_factory): "Upload with dirac (CLIENT): Test the functionality of the upload method" rse1, rse1_id = rse_factory.make_srm_rse(deterministic=True) rse_client.add_rse_attribute(rse=rse1, key='ANY', value='True') @@ -141,19 +141,21 @@ def test_upload_file_with_dirac(rse_factory, scope, rse_client, did_factory, dow download_dir = file_factory.base_dir fn1 = did_name_generator('file', name_prefix='user') fn2 = did_name_generator('file', name_prefix='user') + scope1 = extract_scope(fn1, [])[0] + scope2 = extract_scope(fn2, [])[0] items = [ { 'path': local_file1, 'rse': rse1, - 'did_scope': scope, + 'did_scope': scope1, 'did_name': fn1, 'guid': generate_uuid() }, { 'path': local_file2, 'rse': rse1, - 'did_scope': scope, + 'did_scope': scope2, 'did_name': fn2, 'guid': generate_uuid() } @@ -162,8 +164,8 @@ def test_upload_file_with_dirac(rse_factory, scope, rse_client, did_factory, dow status = did_factory.upload_client.upload(items, dirac=True) assert status == 0 # download the files - did1 = f"{scope}:{fn1}" - did2 = f"{scope}:{fn2}" + did1 = f"{scope1}:{fn1}" + did2 = f"{scope2}:{fn2}" download_client.download_dids([ {'did': did1, 'base_dir': download_dir}, {'did': did2, 'base_dir': download_dir} @@ -193,11 +195,12 @@ def test_upload_file_with_dirac(rse_factory, scope, rse_client, did_factory, dow directories = fn3['lfn'].split('/') dataset_name = "/".join(directories[0:-1]) local_file3 = file_factory.file_generator() + scope3 = extract_scope(dataset_name, [])[0] items = [ { 'path': local_file3, 'rse': rse1, - 'dataset_scope': scope, + 'dataset_scope': scope3, 'dataset_name': dataset_name, 'guid': generate_uuid() }]