Skip to content

Commit

Permalink
fix: prevent error when accessing index data_type value
Browse files Browse the repository at this point in the history
* This requires an upgrade to virtool-core==3.0.0.
* Mock API shapes were updated.
  • Loading branch information
igboyes authored Nov 30, 2022
1 parent 27485b9 commit b5824a3
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 50 deletions.
94 changes: 47 additions & 47 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ python = "^3.10"
click = "^8.0.0"
aiohttp = "^3.8.1"
aiofiles = "^0.7.0"
virtool-core = "^2.0.0"
virtool-core = "^3.0.0"
aioredis = "1.3.1"
sentry-sdk = "^1.5.7"
pyfixtures = "^1.0.0"
Expand Down
4 changes: 4 additions & 0 deletions tests/api/__snapshots__/test_indexes_api.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
]),
'ready': True,
'reference': dict({
'data_type': <ReferenceDataType.genome: 'genome'>,
'id': '21n3j5v6',
'name': 'Clone of Banana Viruses',
}),
'user': dict({
'administrator': False,
Expand Down Expand Up @@ -104,7 +106,9 @@
]),
'ready': False,
'reference': dict({
'data_type': <ReferenceDataType.genome: 'genome'>,
'id': '21n3j5v6',
'name': 'Clone of Banana Viruses',
}),
'user': dict({
'administrator': False,
Expand Down
4 changes: 2 additions & 2 deletions tests/api/mocks/mock_analysis_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def get_analysis(request):
"index": {"id": "qldihken", "version": 0},
"job": {"id": "test_job"},
"ready": False,
"reference": {"id": "foo", "name": "Foo"},
"reference": {"id": "foo", "name": "Foo", "data_type": "genome"},
"sample": {"id": "kigvhuql", "name": "Test 1"},
"subtractions": [{"id": "yhxoynb0", "name": "Arabidopsis Thaliana"}],
"user": {"id": "abc12345", "handle": "igboyes", "administrator": False},
Expand Down Expand Up @@ -116,5 +116,5 @@ async def upload_result(request):
"user": {"id": "abc12345", "handle": "igboyes", "administrator": False},
"subtractions": [{"id": "yhxoynb0", "name": "Arabidopsis Thaliana"}],
"ready": False,
"reference": {"id": "foo", "name": "Foo"},
"reference": {"id": "foo", "name": "Foo", "data_type": "genome"},
}

0 comments on commit b5824a3

Please sign in to comment.