Skip to content

Commit

Permalink
fix(data): rollback to old value
Browse files Browse the repository at this point in the history
  • Loading branch information
thanh-nguyen-dang committed Jul 21, 2023
1 parent 5809d73 commit b622a9a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion tests/graphql/data/biospec1.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"submitter_id": "BLGSP-71-06-00005-99A-01D"
},
"submitter_id": "CGCI-file-3",
"file_size": 59627182820,
"file_size": 5962718282,
"file_name": "C500.CGCI-file3.bam",
"md5sum": "c415baa7b6359835b39360c0159aef26"
}
Expand Down
4 changes: 2 additions & 2 deletions tests/graphql/data/biospec2.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"submitter_id": "BLGSP-71-06-00005-01A-21D"
},
"submitter_id": "CGCI-file-4",
"file_size": 59627182820,
"file_size": 5962718282,
"file_name": "C500.CGCI-file4.bam",
"md5sum": "35b39360cc41a7b635980159aef265ba"
}, {
Expand All @@ -22,7 +22,7 @@
"submitter_id": "BLGSP-71-06-00005-01A-21D"
},
"submitter_id": "CGCI-file-5",
"file_size": 59627182820,
"file_size": 5962718282,
"file_name": "C500.CGCI-file-6.bam",
"md5sum": "35980159aef265ba35b39360cc41a7b6"
}
Expand Down
4 changes: 2 additions & 2 deletions tests/graphql/data/bulk1.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"doc_format": "JSON"
},
{
"doc": "{\"file_name\": \"C500.CGCI-file1.bam\", \"md5sum\": \"35b39360cc41a7b635980159aef265ba\", \"submitter_id\": \"CGCI-file-1\", \"aliquots\": {\"submitter_id\": \"BLGSP-71-06-00005-99A-01D\"}, \"file_size\": 59627182820, \"type\": \"file\"}",
"doc": "{\"file_name\": \"C500.CGCI-file1.bam\", \"md5sum\": \"35b39360cc41a7b635980159aef265ba\", \"submitter_id\": \"CGCI-file-1\", \"aliquots\": {\"submitter_id\": \"BLGSP-71-06-00005-99A-01D\"}, \"file_size\": 5962718282, \"type\": \"file\"}",
"name": "CGCI-file-1.json",
"doc_format": "JSON"
},
{
"doc": "{\"file_name\": \"C500.CGCI-file2.bam\", \"md5sum\": \"35980159aef265ba35b39360cc41a7b6\", \"submitter_id\": \"CGCI-file-2\", \"aliquots\": {\"submitter_id\": \"BLGSP-71-06-00005-99A-01D\"}, \"file_size\": 59627182820, \"type\": \"file\"}",
"doc": "{\"file_name\": \"C500.CGCI-file2.bam\", \"md5sum\": \"35980159aef265ba35b39360cc41a7b6\", \"submitter_id\": \"CGCI-file-2\", \"aliquots\": {\"submitter_id\": \"BLGSP-71-06-00005-99A-01D\"}, \"file_size\": 5962718282, \"type\": \"file\"}",
"name": "CGCI-file-2.json",
"doc_format": "JSON"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/graphql/data/read_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"library_strategy": "WXS",
"library_name": "library1",
"is_paired_end": false,
"read_length": 12345,
"read_length": 59627182820,
"read_group_name": "readgroup-1"
}
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": 5962718282,
"file_size": 59627182820,
"file_name": "C500.CGCI-file1.bam",
"md5sum": "35b39360cc41a7b635980159aef265ba",
"experimental_strategy": "WGS",
Expand Down
2 changes: 1 addition & 1 deletion tests/graphql/data/submitted_unaligned_reads_invalid.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",
"experimental_strategy": "WGS",
"data_type": "Unaligned Reads",
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,34 +1269,34 @@ 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"""
post_example_entities_together(client, pg_driver_clean, submitter)

r = client.post(
path,
headers=submitter,
data=json.dumps(
{
"query": """
query Test {
read_group (
order_by_desc: "read_length",
)
{ submitter_id, read_length }
}
"""
}
),
)
assert r.json == {
"data": {
"submitted_unaligned_reads": [
{"submitter_id": "test-readgroup-1", "read_length": 59627182820.0},
]
}
}, r.data


def test_read_group_with_path_to_case(client, submitter, pg_driver_clean, cgci_blgsp):
Expand Down
2 changes: 2 additions & 0 deletions tests/graphql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"diagnosis.json",
"exposure.json",
"treatment.json",
"read_group.json",
# "submitted_unaligned_reads.json",
]

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

0 comments on commit b622a9a

Please sign in to comment.