Skip to content

Commit 96a0721

Browse files
committed
fixing sonarcube duplicates
1 parent 5b3ca38 commit 96a0721

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

tests/regression/regression_tests/fobt_regression_tests/test_scenario_14.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,13 @@ def test_scenario_14(page: Page) -> None:
363363
)
364364
# And I enter a Diagnostic Test First Offered Appointment Date of "today"
365365
AdvanceFOBTScreeningEpisodePage(page).click_calendar_button()
366-
CalendarPicker(page).v1_calender_picker(datetime.today())
366+
CalendarPicker(page).v1_calender_picker(date=datetime.today())
367367
# And I advance the subject's episode for "Invite for Diagnostic Test >>"
368368
AdvanceFOBTScreeningEpisodePage(page).click_invite_for_diagnostic_test_button()
369369
# Then my subject has been updated as follows:
370+
latest_event_status = "A59 - Invited for Diagnostic Test"
370371
AdvanceFOBTScreeningEpisodePage(page).verify_latest_event_status_value(
371-
latest_event_status="A59 - Invited for Diagnostic Test"
372+
latest_event_status
372373
)
373374

374375
# And I select the advance episode option for "Attend Diagnostic Test"
@@ -377,14 +378,15 @@ def test_scenario_14(page: Page) -> None:
377378
AdvanceFOBTScreeningEpisodePage(page).click_attend_diagnostic_test_button()
378379
# And I attend the subject's diagnostic test yesterday
379380
AttendDiagnosticTestPage(page).click_calendar_button()
380-
CalendarPicker(page).v1_calender_picker(datetime.today() - timedelta(days=1))
381+
CalendarPicker(page).v1_calender_picker(date=datetime.today() - timedelta(days=1))
381382
AttendDiagnosticTestPage(page).click_save_button()
382383
# Then my subject has been updated as follows:
384+
criteria = {
385+
"latest event status": "A259 Attended Diagnostic Test",
386+
}
383387
subject_assertion(
384388
nhs_number=nhs_no,
385-
criteria={
386-
"latest event status": "A259 Attended Diagnostic Test",
387-
},
389+
criteria=criteria,
388390
)
389391

390392
# When I view the subject
@@ -402,7 +404,11 @@ def test_scenario_14(page: Page) -> None:
402404
"Resect & Discard accreditation status": "None",
403405
}
404406
query = PersonRepository().build_person_selection_query(
405-
criteria=criteria, person=None, required_person_count=1, user=user, subject=None
407+
criteria=criteria,
408+
person=None,
409+
user=user,
410+
subject=None,
411+
required_person_count=1,
406412
)
407413
logging.info(f"Final query: {query}")
408414
df = OracleDB().execute_query(query)
@@ -412,13 +418,16 @@ def test_scenario_14(page: Page) -> None:
412418

413419
# And I set the following fields and values within the Investigation Dataset for this subject:
414420
general_information = {
415-
"site": 1,
416421
"practitioner": 1,
422+
"site": 1,
417423
"testing clinician": person_name,
418424
"aspirant endoscopist": None,
419425
}
420426
# And I add the following bowel preparation drugs and values within the Investigation Dataset for this subject:
421-
drug_information = {"drug_type1": DrugTypeOptions.MANNITOL, "drug_dose1": "3"}
427+
drug_information = {
428+
"drug_dose1": "3",
429+
"drug_type1": DrugTypeOptions.MANNITOL,
430+
}
422431
# And I set the following endoscopy fields and values within the Investigation Dataset for this subject:
423432
endoscopy_information = {
424433
"endoscope inserted": "yes",

0 commit comments

Comments
 (0)