Skip to content

Commit

Permalink
Add DUOS bundle to response test
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Jan 8, 2025
1 parent 27c948d commit 950ce68
Showing 1 changed file with 107 additions and 46 deletions.
153 changes: 107 additions & 46 deletions test/service/test_response_anvil.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def tearDownClass(cls):

@classmethod
def bundles(cls) -> list[TDRAnvilBundleFQID]:
return [cls.primary_bundle()]
return [cls.primary_bundle(), cls.duos_bundle()]

def test_entity_indices(self):
self.maxDiff = None
Expand Down Expand Up @@ -881,6 +881,30 @@ def test_entity_indices(self):
},
'bundles': {
'hits': [
{
'activities': [],
'biosamples': [],
'bundles': [
{
'accessible': True,
'bundle_uuid': '2370f948-2783-aeb6-afea-e022897f4dcf',
'bundle_version': '2022-06-01T00:00:00.000000Z'
}
],
'datasets': [
{}
],
'diagnoses': [],
'donors': [],
'entryId': '2370f948-2783-aeb6-afea-e022897f4dcf',
'files': [],
'sources': [
{
'source_id': '6c87f0e1-509d-46a4-b845-7584df39263b',
'source_spec': 'tdr:bigquery:gcp:test_anvil_project:anvil_snapshot:/2'
}
]
},
{
'activities': [
{
Expand Down Expand Up @@ -959,125 +983,157 @@ def test_entity_indices(self):
}
],
'pagination': {
'count': 1,
'count': 2,
'next': None,
'order': 'asc',
'pages': 1,
'previous': None,
'size': 10,
'sort': 'bundle_uuid',
'total': 1
'total': 2
},
'termFacets': {
'accessible': {
'terms': [{'count': 1, 'term': 'true'}],
'total': 1,
'terms': [{'count': 2, 'term': 'true'}],
'total': 2,
'type': 'terms'
},
'activities.activity_type': {
'terms': [{'count': 1, 'term': 'Sequencing'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'Sequencing'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'activities.assay_type': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'activities.data_modality': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'biosamples.anatomical_site': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'biosamples.biosample_type': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'biosamples.disease': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'datasets.consent_group': {
'terms': [{'count': 1, 'term': 'DS-BDIS'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'DS-BDIS'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'datasets.data_use_permission': {
'terms': [{'count': 1, 'term': 'DS-BDIS'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'DS-BDIS'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'datasets.registered_identifier': {
'terms': [{'count': 1, 'term': 'phs000693'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'phs000693'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'datasets.title': {
'terms': [{'count': 1, 'term': 'ANVIL_CMG_UWASH_DS_BDIS'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'ANVIL_CMG_UWASH_DS_BDIS'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'diagnoses.disease': {
'terms': [
{'count': 1, 'term': 'redacted-A61iJlLx'},
{'count': 1, 'term': 'redacted-g50ublm/'}
{'count': 1, 'term': 'redacted-g50ublm/'},
{'count': 1, 'term': None}
],
'total': 1,
'total': 2,
'type': 'terms'
},
'diagnoses.phenopacket': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'diagnoses.phenotype': {
'terms': [{'count': 1, 'term': 'redacted-acSYHZUr'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'redacted-acSYHZUr'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'donors.organism_type': {
'terms': [{'count': 1, 'term': 'redacted-ACw+6ecI'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'redacted-ACw+6ecI'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'donors.phenotypic_sex': {
'terms': [{'count': 1, 'term': 'redacted-JfQ0b3xG'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'redacted-JfQ0b3xG'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'donors.reported_ethnicity': {
'terms': [{'count': 1, 'term': 'redacted-NSkwDycK'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'redacted-NSkwDycK'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'files.data_modality': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
},
'files.file_format': {
'terms': [
{'count': 1, 'term': '.bam'},
{'count': 1, 'term': '.vcf.gz'}
{'count': 1, 'term': '.vcf.gz'},
{'count': 1, 'term': None}
],
'total': 1,
'total': 2,
'type': 'terms'
},
'files.is_supplementary': {
'terms': [{'count': 1, 'term': 'false'}],
'total': 1,
'terms': [
{'count': 1, 'term': 'false'},
{'count': 1, 'term': None}
],
'total': 2,
'type': 'terms'
},
'files.reference_assembly': {
'terms': [{'count': 1, 'term': None}],
'total': 1,
'terms': [{'count': 2, 'term': None}],
'total': 2,
'type': 'terms'
}
}
Expand All @@ -1093,6 +1149,10 @@ def test_entity_indices(self):
}
],
'bundles': [
{
'bundle_uuid': '2370f948-2783-aeb6-afea-e022897f4dcf',
'bundle_version': '2022-06-01T00:00:00.000000Z'
},
{
'bundle_uuid': '826dea02-e274-affe-aabc-eb3db63ad068',
'bundle_version': '2022-06-01T00:00:00.000000Z'
Expand Down Expand Up @@ -1159,7 +1219,8 @@ def test_entity_indices(self):
'data_modality': [
None
],
'accessible': True
'accessible': True,
'description': 'Study description from DUOS'
}
],
'diagnoses': [
Expand Down

0 comments on commit 950ce68

Please sign in to comment.