Skip to content

Commit 057c0ee

Browse files
committed
fix file not found error
1 parent 33d3d7d commit 057c0ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lambdas/shared/tests/test_common/validator/test_application_fhir.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Test application file
22
import json
3+
import os
34
import time
45
import unittest
56
from pathlib import Path
@@ -11,7 +12,7 @@
1112

1213
class TestApplication(unittest.TestCase):
1314
def setUp(self):
14-
validation_folder = Path(__file__).parent
15+
validation_folder = Path(__file__).resolve().parent
1516
self.FHIRFilePath = validation_folder / "data/vaccination2.json"
1617
self.schemaFilePath = validation_folder / "schemas/schema.json"
1718

@@ -22,6 +23,10 @@ def test_validation(self):
2223
with open(self.schemaFilePath) as JSON:
2324
SchemaFile = json.load(JSON)
2425

26+
print("Current working directory:", os.getcwd())
27+
print("Test file directory:", Path(__file__).parent)
28+
print("Schema file exists:", (Path(__file__).parent / "schemas" / "schema.json").exists())
29+
2530
validator = Validator(SchemaFile) # FHIR File Path not needed
2631
error_list = validator.validate_fhir(self.FHIRFilePath, True, True, True)
2732
error_report = validator.build_error_report("25a8cc4d-1875-4191-ac6d-2d63a0ebc64b") # include eventID if known

0 commit comments

Comments
 (0)