Skip to content

Commit

Permalink
finish assembly md5sum check
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed May 10, 2024
1 parent c23e9a4 commit 43c420f
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions test/supplemental_genbank_tests/genbank_upload_full_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,6 @@ def _download_file_from_blobstore(self, handle_id):
'unpack': 'unpack',
}
)

file_path = file_ret['file_path']
print("*" * 30)
print(f"output_dir is {os.listdir(output_dir)}")
print(f"file_path is {file_path}")
print("*" * 30)

return file_ret['file_path']

def _calculate_md5sum(self, file_path):
Expand Down Expand Up @@ -324,7 +317,7 @@ def _retrieve_assembly_data(self, data):
# check handle ref
file_path = self._download_file_from_blobstore(handle_id)
retrieved_assembly_md5sum = self._calculate_md5sum(file_path)
print(f"retrieved_assembly_md5sum is {retrieved_assembly_md5sum}")
assert retrieved_assembly_md5sum == handle["remote_md5"]

url = handle.get('url')
assert url.startswith('https://')
Expand Down Expand Up @@ -373,7 +366,7 @@ def _check_data(self, obj, expected_data, expected_md5sum, is_genome):
)

assert retrieved_data == expected_data
# assert retrieved_md5sum == expected_md5sum
assert retrieved_md5sum == expected_md5sum

def _check_result_object_info_provenance_data(
self,
Expand Down Expand Up @@ -491,18 +484,16 @@ def test_genbanks_to_genomes(self):
self._load_expected_data("data/genome_curated/assembly_ontology.json"),
]

# md5sum of processed genome file
expected_genome_md5sum = [
"b11f26a802d3302dc2648090930bd543",
"2ae04b5ede4e27ce1fdd42ff023bf99c",
"09b935cb6fc37ea17e36ff4cf72815c1",
]

# md5sum of assembly file
expected_assembly_md5sum = [
"",
"",
"",
"cd8a65e6af5fcb25bf665e5ed3732607",
"cd8a65e6af5fcb25bf665e5ed3732607",
"cd8a65e6af5fcb25bf665e5ed3732607",
]

results = self.serviceImpl.genbanks_to_genomes(
Expand Down

0 comments on commit 43c420f

Please sign in to comment.