diff --git a/test/data/metagenomes/toy/features_handle_ref b/test/data/metagenomes/toy/features_handle_ref new file mode 100644 index 00000000..f67a087d --- /dev/null +++ b/test/data/metagenomes/toy/features_handle_ref @@ -0,0 +1 @@ +test features_handle_ref \ No newline at end of file diff --git a/test/data/metagenomes/toy/metagenome.json b/test/data/metagenomes/toy/metagenome.json index 57e42815..95c23ef8 100644 --- a/test/data/metagenomes/toy/metagenome.json +++ b/test/data/metagenomes/toy/metagenome.json @@ -15,7 +15,6 @@ "non_coding_features": 0, "protein_encoding_gene": 20 }, - "features_handle_ref": "KBH_736245", "gc_content": 0.64469, "genetic_code": 1, "genome_type": "Metagenome", @@ -36,7 +35,6 @@ } ], "original_source_file_name": null, - "protein_handle_ref": "KBH_736243", "publications": [], "scientific_name": "Arabidopsis thaliana", "source": "GFF", diff --git a/test/data/metagenomes/toy/protein_handle_ref b/test/data/metagenomes/toy/protein_handle_ref new file mode 100644 index 00000000..4e4a8e1f --- /dev/null +++ b/test/data/metagenomes/toy/protein_handle_ref @@ -0,0 +1 @@ +test protein_handle_ref \ No newline at end of file diff --git a/test/problematic_tests/save_genome_test.py b/test/problematic_tests/save_genome_test.py index 5380738c..70eff5c1 100644 --- a/test/problematic_tests/save_genome_test.py +++ b/test/problematic_tests/save_genome_test.py @@ -149,6 +149,29 @@ def prepare_data(cls): cls.test_metagenome_data = json.load(open('data/metagenomes/toy/metagenome.json')) cls.test_metagenome_data['assembly_ref'] = assembly_refs[1]["upa"] + # Move files to the share folder + fhr_path = os.path.join(cls.scratch,'features_handle_ref') + phr_path = os.path.join(cls.scratch,'protein_handle_ref') + + shutil.copy('data/metagenomes/toy/features_handle_ref', fhr_path) + shutil.copy('data/metagenomes/toy/protein_handle_ref', phr_path) + + # Upload files to the blobstore + handle_service_outputs = cls.dfu.file_to_shock_mass( + [ + {'file_path': fhr_path, 'make_handle': 1, 'pack': 'gzip'}, + {'file_path': phr_path, 'make_handle': 1, 'pack': 'gzip'} + ] + ) + + # Update metagenome + cls.test_metagenome_data["features_handle_ref"] = handle_service_outputs[0]["handle"]["hid"] + cls.test_metagenome_data["protein_handle_ref"]= handle_service_outputs[1]["handle"]["hid"] + + # Delete shock_ids + cls.nodes_to_delete.append(handle_service_outputs[0]["shock_id"]) + cls.nodes_to_delete.append(handle_service_outputs[1]["shock_id"]) + def getWsClient(self): return self.__class__.wsClient