Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Nov 6, 2024
1 parent 481bd07 commit 6e4d0c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mars-cli/mars_lib/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def submission(
print_and_log(
f"Submission to {TargetRepository.ENA} was successful. Result:\n{ena_result.json()}"
)
# TODO: Update `isa_json`, based on the receipt returned
# Update `isa_json`, based on the receipt returned
ena_mars_receipt = RepositoryResponse.from_json(str(ena_result.content))
isa_json = update_isa_json(isa_json, ena_mars_receipt)
if DEBUG:
Expand Down
10 changes: 3 additions & 7 deletions mars-cli/tests/test_isa_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,20 @@ def test_update_study_materials_no_accession_categories():
updated_isa_json = update_isa_json(validated_isa_json, repo_response)

# Check the accession number of the source
# Accession characteristic is of type String
assert (
updated_isa_json.investigation.studies[0]
.materials.sources[0]
.characteristics[-1]
.value
.value.annotationValue
== repo_response.accessions[0].value
)

# Check the accession number of the sample
# Accession characteristic is of type String
assert (
updated_isa_json.investigation.studies[0]
.materials.samples[0]
.characteristics[-1]
.value
.value.annotationValue
== repo_response.accessions[1].value
)

Expand All @@ -222,7 +220,6 @@ def test_update_study_materials_with_accession_categories():

updated_isa_json = update_isa_json(validated_isa_json, repo_response)
# Check the accession number of the source
# Accession characteristic is of type OntologyAnnotation
assert (
updated_isa_json.investigation.studies[0]
.materials.sources[0]
Expand All @@ -232,12 +229,11 @@ def test_update_study_materials_with_accession_categories():
)

# Check the accession number of the sample
# Accession characteristic is of type String
assert (
updated_isa_json.investigation.studies[0]
.materials.samples[0]
.characteristics[-1]
.value
.value.annotationValue
== repo_response.accessions[1].value
)

Expand Down

0 comments on commit 6e4d0c6

Please sign in to comment.