Skip to content

Commit

Permalink
fix(test): fix test failed
Browse files Browse the repository at this point in the history
  • Loading branch information
thanh-nguyen-dang committed Jul 12, 2023
1 parent aac3a9e commit 5809d73
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion tests/graphql/data/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"submitter_id": "BLGSP-71-06-00005-99A-01D"
},
"submitter_id": "CGCI-file-2",
"file_size": 59627182820,
"file_size": 5962718282,
"file_name": "C500.CGCI-file1.bam",
"md5sum": "35b39360cc41a7b635980159aef265ba"
}
2 changes: 1 addition & 1 deletion tests/graphql/data/submitted_unaligned_reads.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"submitter_id": "CGCI-file-2",
"data_format": "BAM",
"file_size": 59627182820,
"file_size": 5962718282,
"file_name": "C500.CGCI-file1.bam",
"md5sum": "35b39360cc41a7b635980159aef265ba",
"experimental_strategy": "WGS",
Expand Down
56 changes: 28 additions & 28 deletions tests/graphql/test_graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,35 +1269,35 @@ def test_without_path_order(client, submitter, pg_driver_clean, cgci_blgsp):
}
}, r.data

#
# def test_file_size_long(client, submitter, pg_driver_clean, cgci_blgsp):
# """Assert the long type is working as float"""
# put_example_entities_together(client, pg_driver_clean, submitter)
#
# r = client.post(
# path,
# headers=submitter,
# data=json.dumps(
# {
# "query": """
# query Test {
# submitted_unaligned_reads (
# order_by_desc: "file_size",
# )
# { submitter_id file_size }
# }
# """
# }
# ),
# )
# assert r.json == {
# "data": {
# "submitted_unaligned_reads": [
# {"submitter_id": "CGCI-file-2", "file_size": 5962718282},
# ]
# }
# }, r.data

def test_file_size_long(client, submitter, pg_driver_clean, cgci_blgsp):
"""Assert the long type is working as float"""
put_example_entities_together(client, pg_driver_clean, submitter)

r = client.post(
path,
headers=submitter,
data=json.dumps(
{
"query": """
query Test {
file (
order_by_desc: "file_size",
)
{ submitter_id file_size }
}
"""
}
),
)

assert r.json == {
"data": {
"case": [
{"submitter_id": "CGCI-file-2", "file_size": 59627182820},
]
}
}, r.data

def test_read_group_with_path_to_case(client, submitter, pg_driver_clean, cgci_blgsp):
"""Regression for incorrect counts"""
Expand Down
1 change: 0 additions & 1 deletion tests/graphql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"diagnosis.json",
"exposure.json",
"treatment.json",
"file.json",
]

PATH = "/v0/submission/graphql"
Expand Down

0 comments on commit 5809d73

Please sign in to comment.