Skip to content

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c committed Nov 19, 2024
1 parent a4596f0 commit d0ca30f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def test_adding_identifier(external_patient_search):
result = add_identifier_to_resource_type(external_patient_search, "Patient", ident)
assert result != external_patient_search
for entry in result["entry"]:
assert len(entry["identifier"]) == 1
assert entry["identifier"][0] == ident
assert len(entry["resource"]["identifier"]) == 1
assert entry["resource"]["identifier"][0] == ident


def test_existing(
Expand Down
15 changes: 8 additions & 7 deletions tests/test_sync/external_patient_active_search.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"entry": [
{
"entry": [
{
"resource": {
"active": true,
"birthDate": "1977-01-12",
"gender": "male",
Expand All @@ -10,8 +11,8 @@
},
"resourceType": "Patient"
}
],
"resourceType": "Bundle",
"type": "searchset"
}
}
],
"resourceType": "Bundle",
"type": "searchset"
}
16 changes: 9 additions & 7 deletions tests/test_sync/external_patient_search.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"entry": [
{
"birthDate": "1977-01-12",
"gender": "male",
"name": {
"family": "skywalker",
"given": ["luke"]
},
"resourceType": "Patient"
"resource": {
"birthDate": "1977-01-12",
"gender": "male",
"name": {
"family": "skywalker",
"given": ["luke"]
},
"resourceType": "Patient"
}
}
],
"resourceType": "Bundle",
Expand Down

0 comments on commit d0ca30f

Please sign in to comment.