aidbox-python-sdk 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aidbox_python_sdk-0.2.1/aidbox_python_sdk.egg-info → aidbox_python_sdk-0.2.2}/PKG-INFO +1 -1
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/__init__.py +1 -1
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/handlers.py +1 -8
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2/aidbox_python_sdk.egg-info}/PKG-INFO +1 -1
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/tests/test_sdk.py +0 -12
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/LICENSE.md +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/MANIFEST.in +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/README.md +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/aidboxpy.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/app_keys.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/db.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/db_migrations.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/exceptions.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/main.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/py.typed +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/pytest_plugin.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/sdk.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/settings.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/types.py +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/SOURCES.txt +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/dependency_links.txt +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/not-zip-safe +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/requires.txt +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/top_level.txt +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/pyproject.toml +0 -0
- {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/setup.cfg +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import json
|
|
3
2
|
import logging
|
|
4
3
|
from typing import Any
|
|
5
4
|
|
|
6
5
|
from aiohttp import web
|
|
7
|
-
from fhirpy.base.exceptions import
|
|
6
|
+
from fhirpy.base.exceptions import OperationOutcome
|
|
8
7
|
|
|
9
8
|
from . import app_keys as ak
|
|
10
9
|
|
|
@@ -49,12 +48,6 @@ async def operation(request: web.Request, data: dict[str, Any]):
|
|
|
49
48
|
return result
|
|
50
49
|
except OperationOutcome as exc:
|
|
51
50
|
return web.json_response(exc.resource, status=422)
|
|
52
|
-
except BaseFHIRError as exc:
|
|
53
|
-
try:
|
|
54
|
-
payload = json.loads(str(exc))
|
|
55
|
-
return web.json_response(payload, status=422)
|
|
56
|
-
except (json.JSONDecodeError, TypeError):
|
|
57
|
-
return web.Response(text=str(exc), status=422, content_type="text/plain")
|
|
58
51
|
|
|
59
52
|
|
|
60
53
|
TYPES = {
|
|
@@ -192,18 +192,6 @@ async def test_aidbox_db_fixture(client, aidbox_db: DBProxy, safe_db):
|
|
|
192
192
|
assert app_ids == [{"id": "app-test"}]
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
async def test_operation_base_fhir_error_json_test_op(aidbox_client):
|
|
196
|
-
with pytest.raises(OperationOutcome) as exc:
|
|
197
|
-
await aidbox_client.execute("/$base-fhir-error-json-test")
|
|
198
|
-
assert exc.value.resource.get("issue")[0].get("diagnostics") == "Resource Patient/id not found"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
async def test_operation_base_fhir_error_text_test_op(aidbox_client):
|
|
202
|
-
with pytest.raises(OperationOutcome) as exc:
|
|
203
|
-
await aidbox_client.execute("/$base-fhir-error-text-test")
|
|
204
|
-
assert exc.value.resource.get("issue")[0].get("diagnostics") == "plain"
|
|
205
|
-
|
|
206
|
-
|
|
207
195
|
async def test_operation_outcome_test_op(aidbox_client):
|
|
208
196
|
with pytest.raises(OperationOutcome) as exc:
|
|
209
197
|
await aidbox_client.execute("/$operation-outcome-test")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|