diff --git a/tests/tools/archive/orm/test_groups.py b/tests/tools/archive/orm/test_groups.py index f4651248b..dee3aafa8 100644 --- a/tests/tools/archive/orm/test_groups.py +++ b/tests/tools/archive/orm/test_groups.py @@ -17,7 +17,7 @@ from aiida.tools.archive import create_archive, import_archive -def test_nodes_in_group(aiida_profile, tmp_path, aiida_localhost): +def test_nodes_in_group(aiida_profile_clean, tmp_path, aiida_localhost): """This test checks that nodes that belong to a specific group are correctly imported and exported. """ @@ -51,7 +51,7 @@ def test_nodes_in_group(aiida_profile, tmp_path, aiida_localhost): filename1 = tmp_path / 'export1.aiida' create_archive([sd1, jc1, gr1], filename=filename1) n_uuids = [sd1.uuid, jc1.uuid] - aiida_profile.reset_storage() + aiida_profile_clean.reset_storage() import_archive(filename1) # Check that the imported nodes are correctly imported and that @@ -65,7 +65,7 @@ def test_nodes_in_group(aiida_profile, tmp_path, aiida_localhost): assert builder.count() == 1, 'The group was not found.' -def test_group_export(tmp_path, aiida_profile): +def test_group_export(tmp_path, aiida_profile_clean): """Exporting a group includes its extras and nodes.""" # Create a new user new_email = uuid.uuid4().hex @@ -89,7 +89,7 @@ def test_group_export(tmp_path, aiida_profile): filename = tmp_path / 'export.aiida' create_archive([group], filename=filename) n_uuids = [sd1.uuid] - aiida_profile.reset_storage() + aiida_profile_clean.reset_storage() import_archive(filename) # Check that the imported nodes are correctly imported and that @@ -105,7 +105,7 @@ def test_group_export(tmp_path, aiida_profile): assert imported_group.base.extras.get('test') == 1, 'Extra missing on imported group' -def test_group_import_existing(tmp_path, aiida_profile): +def test_group_import_existing(tmp_path, aiida_profile_clean): """Testing what happens when I try to import a group that already exists in the database. This should raise an appropriate exception """ @@ -130,7 +130,7 @@ def test_group_import_existing(tmp_path, aiida_profile): # At this point we export the generated data filename = tmp_path / 'export1.aiida' create_archive([group], filename=filename) - aiida_profile.reset_storage() + aiida_profile_clean.reset_storage() # Creating a group of the same name group = orm.Group(label='node_group_existing') @@ -154,7 +154,7 @@ def test_group_import_existing(tmp_path, aiida_profile): assert builder.count() == 2 -def test_import_to_group(tmp_path, aiida_profile): +def test_import_to_group(tmp_path, aiida_profile_clean): """Test `group` parameter Make sure an unstored Group is stored by the import function, forwarding the Group object. Make sure the Group is correctly handled and used for imported nodes. @@ -167,7 +167,7 @@ def test_import_to_group(tmp_path, aiida_profile): # Export Nodes filename = tmp_path / 'export.aiida' create_archive([data1, data2], filename=filename) - aiida_profile.reset_storage() + aiida_profile_clean.reset_storage() # Create Group, do not store group_label = 'import_madness'