-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_additional_fields_0_4_0.py: Add test
- Loading branch information
Ed (ODSC)
committed
Oct 22, 2024
1 parent
17457f0
commit 4e727ba
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7", | ||
"extratestfield1": "test", | ||
"declarationSubject": "c359f58d2977", | ||
"statementDate": "2020-03-04", | ||
"recordId": "c359f58d2977", | ||
"recordType": "entity", | ||
"recordDetails": { | ||
"extratestfield2": "test", | ||
"isComponent": false, | ||
"entityType": { | ||
"type": "registeredEntity" | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import json | ||
import os | ||
import tempfile | ||
|
||
from tests.api import bods_json_output | ||
|
||
|
||
def test_additional_fields_1(): | ||
|
||
cove_temp_folder = tempfile.mkdtemp( | ||
prefix="lib-cove-bods-tests-", dir=tempfile.gettempdir() | ||
) | ||
json_filename = os.path.join( | ||
os.path.dirname(os.path.realpath(__file__)), "fixtures", "0.4", "additional_fields_1.json" | ||
) | ||
|
||
results = bods_json_output(cove_temp_folder, json_filename) | ||
|
||
print(results) | ||
|
||
assert results["schema_version"] == "0.4" | ||
assert results["validation_errors_count"] == 0 | ||
assert results["additional_fields_count"] == 2 | ||
assert results["additional_checks_count"] == 0 | ||
|
||
assert False |