Skip to content

Commit 21e0073

Browse files
committed
whitespaces removed
1 parent 562012f commit 21e0073

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

delta_backend/src/ConversionChecker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def convertData(self, expressionType, expressionRule, fieldName, fieldValue):
9393
expressionRule, fieldName, fieldValue, self.summarise, self.report_unexpected_exception
9494
)
9595
case _:
96-
return "Schema expression not found! Check your expression type : " + expressionType
96+
return "Schema expression not found! Check your expression type : " + expressionType
9797

9898
# Utility function for logging errors
9999
def _log_error(self, fieldName, fieldValue, e, code=ExceptionMessages.RECORD_CHECK_FAILED):
@@ -114,7 +114,6 @@ def _log_error(self, fieldName, fieldValue, e, code=ExceptionMessages.RECORD_CHE
114114
})
115115

116116
def _convertToDate(self, expressionRule, fieldName, fieldValue, summarise, report_unexpected_exception):
117-
print("FIELD:", fieldName)
118117
if not fieldValue:
119118
return ""
120119

delta_backend/tests/test_convert_to_flat_json.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ def test_convert_to_not_empty(self, MockLookUpData):
364364
result = checker._convertToNotEmpty(None, "fieldName", "", False, True)
365365
self.assertEqual(result, "")
366366

367-
368367
@patch("ConversionChecker.LookUpData")
369368
def test_convert_to_nhs_number(self, MockLookUpData):
370369

@@ -400,12 +399,10 @@ def test_convert_to_date(self, MockLookUpData):
400399
# 2. Partial ISO date (should trigger "Partial date not accepted")
401400
result = checker._convertToDate("%Y%m%d", "fieldName", "2022-01", False, True)
402401
self.assertEqual(result, "")
403-
404-
402+
405403
# 3. Invalid string date format (should trigger "Date must be in YYYYMMDD format")
406404
result = checker._convertToDate("%Y%m%d", "fieldName", "invalid_date", False, True)
407405
self.assertEqual(result, "")
408-
409406

410407
# 4. None input (should return empty without logging)
411408
result = checker._convertToDate("%Y%m%d", "fieldName", None, False, True)
@@ -489,7 +486,7 @@ def test_convert_to_dose(self, MockLookUpData):
489486
with self.subTest(dose=dose):
490487
result = checker._convertToDose("DOSESEQUENCE", "DOSE_AMOUNT", dose, False, True)
491488
self.assertEqual(result, dose)
492-
489+
493490
# Invalid dose
494491
invalid_doses = [10, 10.1, 100, 9.0001]
495492
for dose in invalid_doses:
@@ -1226,4 +1223,4 @@ def _run_test_practitioner_surname(self, expected_forename):
12261223
self.assertEqual(flat_json[0]["PERFORMING_PROFESSIONAL_SURNAME"], expected_forename)
12271224

12281225
if __name__ == "__main__":
1229-
unittest.main()
1226+
unittest.main()

0 commit comments

Comments
 (0)