Skip to content

Commit 6fd0b0c

Browse files
Fixing SonarQube duplication issue
1 parent c1b4c35 commit 6fd0b0c

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

tests/regression/regression_tests/fobt_regression_tests/test_scenario_15.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,16 @@ def test_scenario_15(page: Page) -> None:
376376
)
377377

378378
# When I view the subject
379-
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
379+
screening_subject_page_searcher.navigate_to_subject_summary_page(
380+
page=page, nhs_no=nhs_no
381+
)
380382

381383
# And I edit the Investigation Dataset for this subject
382384
SubjectScreeningSummaryPage(page).click_datasets_link()
383385
SubjectDatasetsPage(page).click_investigation_show_datasets()
384386

385387
# And there is a clinician who meets the following criteria:
386-
user = User.from_user_role_type(user_role)
388+
user = User.from_user_role_type(user_role_type=user_role)
387389
criteria = {
388390
"Person has current role": "Accredited Screening Colonoscopist",
389391
"Person has current role in organisation": "User's SC",
@@ -393,7 +395,7 @@ def test_scenario_15(page: Page) -> None:
393395
criteria=criteria, person=None, required_person_count=1, user=user, subject=None
394396
)
395397
logging.info(f"Final query: {query}")
396-
df = OracleDB().execute_query(query)
398+
df = OracleDB().execute_query(query, None)
397399
person_name = (
398400
f"{df["person_family_name"].iloc[0]} {df["person_given_name"].iloc[0]}"
399401
)
@@ -726,7 +728,7 @@ def test_scenario_15(page: Page) -> None:
726728
# And I advance the subject's episode for "Post-investigation Appointment Required"
727729
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()
728730
AdvanceFOBTScreeningEpisodePage(
729-
page
731+
page=page
730732
).click_post_investigation_appointment_required_button()
731733

732734
# Then my subject has been updated as follows:
@@ -741,7 +743,7 @@ def test_scenario_15(page: Page) -> None:
741743
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
742744

743745
# And I choose to book a practitioner clinic for my subject
744-
SubjectScreeningSummaryPage(page).click_book_practitioner_clinic_button()
746+
SubjectScreeningSummaryPage(page=page).click_book_practitioner_clinic_button()
745747

746748
# And I set the practitioner appointment date to "today"
747749
# And I book the earliest available post investigation appointment on this date
@@ -773,7 +775,7 @@ def test_scenario_15(page: Page) -> None:
773775
SubjectScreeningSummaryPage(page).click_first_fobt_episode_link()
774776

775777
# And I view the latest practitioner appointment in the subject's episode
776-
EpisodeEventsAndNotesPage(page).click_most_recent_view_appointment_link()
778+
EpisodeEventsAndNotesPage(page=page).click_most_recent_view_appointment_link()
777779

778780
# And I attend the subject's practitioner appointment "today"
779781
AppointmentDetailPage(page).mark_appointment_as_attended(datetime.today())
@@ -806,7 +808,7 @@ def test_scenario_15(page: Page) -> None:
806808

807809
# Then my subject has been updated as follows:
808810
AdvanceFOBTScreeningEpisodePage(page).verify_latest_event_status_value(
809-
"A99 - Suitable for Endoscopic Test"
811+
latest_event_status="A99 - Suitable for Endoscopic Test"
810812
)
811813

812814
# When I view the advance episode options
@@ -824,7 +826,7 @@ def test_scenario_15(page: Page) -> None:
824826

825827
# Then my subject has been updated as follows:
826828
AdvanceFOBTScreeningEpisodePage(page).verify_latest_event_status_value(
827-
"A59 - Invited for Diagnostic Test"
829+
latest_event_status="A59 - Invited for Diagnostic Test"
828830
)
829831

830832
# When I select the advance episode option for "Attend Diagnostic Test"
@@ -846,7 +848,9 @@ def test_scenario_15(page: Page) -> None:
846848
)
847849

848850
# When I view the subject
849-
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
851+
screening_subject_page_searcher.navigate_to_subject_summary_page(
852+
page=page, nhs_no=nhs_no
853+
)
850854

851855
# And I edit the Investigation Dataset for this subject
852856
SubjectScreeningSummaryPage(page).click_datasets_link()
@@ -866,7 +870,7 @@ def test_scenario_15(page: Page) -> None:
866870
criteria=criteria, person=None, required_person_count=1, user=user, subject=None
867871
)
868872
logging.info(f"Final query: {query}")
869-
df = OracleDB().execute_query(query)
873+
df = OracleDB().execute_query(query, None)
870874
person_name = (
871875
f"{df["person_family_name"].iloc[0]} {df["person_given_name"].iloc[0]}"
872876
)
@@ -878,6 +882,7 @@ def test_scenario_15(page: Page) -> None:
878882
"testing clinician": person_name,
879883
"aspirant endoscopist": None,
880884
}
885+
881886
endoscopy_information = {
882887
"endoscope inserted": "yes",
883888
"procedure type": "therapeutic",

0 commit comments

Comments
 (0)