Skip to content

Commit c188570

Browse files
committed
updates to GX tests
1 parent fc71678 commit c188570

5 files changed

+228
-176
lines changed

scripts/helpers/housing_nec_migration_gx_dq_inputs.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
sql_config = {
2-
"properties": {"id_field": "LPRO_PROPREF"},
3-
"tenancies": {"id_field": "LTCY_ALT_REF"},
4-
"people": {"id_field": "LPAR_PER_ALT_REF"},
5-
"contacts": {"id_field": "LCDE_LEGACY_REF"},
6-
"arrears_actions": {"id_field": "LACA_PAY_REF"},
7-
"revenue_accounts": {"id_field": "LRAC_PAY_REF"},
8-
"transactions": {"id_field": "LTRN_ALT_REF"},
9-
"addresses": {"id_field": "LAUS_LEGACY_REF"},
2+
"properties": {"id_field": "lpro_propref"},
3+
"tenancies": {"id_field": "ltcy_alt_ref"},
4+
"people": {"id_field": "lpar_per_alt_ref"},
5+
"contacts": {"id_field": "lcde_legacy_ref"},
6+
"arrears_actions": {"id_field": "laca_pay_ref"},
7+
"revenue_accounts": {"id_field": "lrac_pay_ref"},
8+
"transactions": {"id_field": "ltrn_alt_ref"},
9+
"addresses": {"id_field": "laus_legacy_ref"},
1010
}
1111

1212
data_load_list = [
13-
"properties"
14-
# "tenancies",
15-
# "people",
13+
"properties",
14+
"tenancies",
15+
"people"
1616
# "contacts",
1717
# "arrears_actions",
1818
# "revenue_accounts",
@@ -33,21 +33,21 @@
3333
# "properties_4b",
3434
# "properties_4c",
3535
# "properties_7a",
36-
"full_full_hem_pro_all_dq",
36+
"full_dq_full_dq_hem_pro_all_dq",
3737
],
3838
"tenancies": [
3939
# "tenancies_1a",
4040
# "tenancies_1c",
4141
# "tenancies_2a",
4242
# "tenancies_other",
43-
"tenancies_all",
43+
"full_dq_full_dq_hem_tcy_all_dq",
4444
],
4545
"people": [
4646
# "people_1a",
4747
# "people_1b",
4848
# "people_1c",
4949
# "people_2a",
50-
"people_all"
50+
"full_dq_full_dq_hem_per_all_dq"
5151
],
5252
"contacts": [
5353
# "contacts_1a",

scripts/jobs/housing/housing_nec_migration_apply_gx_dq_tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
table_list,
1717
)
1818
import scripts.jobs.housing.housing_nec_migration_properties_data_load_gx_suite
19-
# import scripts.jobs.housing.housing_nec_migration_tenancies_data_load_gx_suite
20-
# import scripts.jobs.housing.housing_nec_migration_people_data_load_gx_suite
19+
import scripts.jobs.housing.housing_nec_migration_tenancies_data_load_gx_suite
20+
import scripts.jobs.housing.housing_nec_migration_people_data_load_gx_suite
21+
2122
# import scripts.jobs.housing.housing_nec_migration_contacts_data_load_gx_suite
2223
# import scripts.jobs.housing.housing_nec_migration_arrears_actions_data_load_gx_suite
2324
# import scripts.jobs.housing.housing_nec_migration_revenue_accounts_data_load_gx_suite
@@ -162,7 +163,7 @@ def main():
162163
)
163164
]
164165

165-
table_results_df["unexpected_id_list"] = pd.Series(dtype="object")
166+
table_results_df["unexpected_id_list"] = pd.Series(dtype="string")
166167

167168
for i, row in query_df.iterrows():
168169
try:

scripts/jobs/housing/housing_nec_migration_people_data_load_gx_suite.py

Lines changed: 72 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99

1010
class PeopleExpectPersonRefColumnValuesToBeUnique(gxe.ExpectColumnValuesToBeUnique):
11-
column: str = "LPAR_PER_ALT_REF"
12-
description: str = "Expect LPAR_PER_ALT_REF (person ref) values to be unique"
11+
column: str = "lpar_per_alt_ref"
12+
description: str = "Expect lpar_per_alt_ref (person ref) values to be unique"
1313

1414

1515
class PeopleExpectPersonRefColumnValuesToNotBeNull(gxe.ExpectColumnValuesToNotBeNull):
16-
column: str = "LPAR_PER_ALT_REF"
17-
description: str = "Expect LPAR_PER_ALT_REF (person ref) values to not be Null"
16+
column: str = "lpar_per_alt_ref"
17+
description: str = "Expect lpar_per_alt_ref (person ref) values to not be Null"
1818

1919

2020
class PeopleExpectTitleToBeInSet(gxe.ExpectColumnValuesToBeInSet):
21-
column: str = "LPAR_PER_TITLE"
21+
column: str = "lpar_per_title"
2222
value_set: list = [
2323
"DAME",
2424
"DR",
@@ -39,37 +39,74 @@ class PeopleExpectTitleToBeInSet(gxe.ExpectColumnValuesToBeInSet):
3939
description: str = "Expect title to be one of the set"
4040

4141

42-
class PeopleExpectPeopleColumnsToMatchOrderedList(gxe.ExpectTableColumnsToMatchOrderedList):
42+
class PeopleExpectPeopleColumnsToMatchOrderedList(
43+
gxe.ExpectTableColumnsToMatchOrderedList
44+
):
4345
column_list = [
44-
"LPAR_HOP_START_DATE",
45-
"LPAR_PER_SURNAME",
46-
"LPAR_TCY_ALT_REF",
47-
"LPAR_PER_FORENAME",
48-
"LPAR_HOP_HPSR_CODE",
49-
"LPAR_PER_TITLE",
50-
"LPAR_PER_INITIALS",
51-
"LPAR_PER_DATE_OF_BIRTH",
52-
"LPAR_PER_HOU_DISABLED_IND",
53-
"LPAR_PER_HOU_OAP_IND",
54-
"LPAR_PER_FRV_FGE_CODE",
55-
"LPAR_HOP_HRV_REL_CODE",
56-
"LPAR_PER_HOU_EMPLOYER",
57-
"LPAR_PER_HOU_HRV_HMS_CODE",
58-
"LPAR_PHONE",
59-
"LPAR_HOP_END_DATE",
60-
"LPAR_HOP_HPER_CODE",
61-
"LPAR_TCY_IND",
62-
"LPAR_TIN_MAIN_TENANT_IND",
63-
"LPAR_TIN_START_DATE",
64-
"LPAR_TIN_END_DATE",
65-
"PAR_TIN_HRV_TIR_CODE",
66-
"LPAR_TIN_STAT_SUCCESSOR_IND",
67-
"LPAR_PER_ALT_REF",
68-
"LPAR_PER_FRV_FEO_CODE",
69-
"LPAR_PER_NI_NO",
70-
"LPAR_PER_FRV_HGO_CODE",
71-
"LPAR_PER_FRV_FNL_CODE",
72-
"LPAR_PER_OTHER_NAME"
46+
"lpar_per_surname",
47+
"lpar_per_forename",
48+
"lpar_hop_start_date",
49+
"lpar_tcy_alt_ref",
50+
"lpar_hop_hpsr_code",
51+
"lpar_per_title",
52+
"lpar_per_initials",
53+
"lpar_per_date_of_birth",
54+
"lpar_per_hou_disabled_ind",
55+
"lpar_per_hou_oap_ind",
56+
"lpar_per_frv_fge_code",
57+
"lpar_hop_hrv_rel_code",
58+
"lpar_per_hou_employer",
59+
"lpar_per_hou_hrv_hms_code",
60+
"lpar_phone",
61+
"lpar_hop_end_date",
62+
"lpar_hop_hper_code",
63+
"lpar_tcy_ind",
64+
"lpar_tin_main_tenant_ind",
65+
"lpar_tin_start_date",
66+
"lpar_tin_end_date",
67+
"lpar_tin_hrv_tir_code",
68+
"lpar_tin_stat_successor_ind",
69+
"lpar_per_alt_ref",
70+
"lpar_per_frv_feo_code",
71+
"lpar_per_ni_no",
72+
"lpar_per_frv_hgo_code",
73+
"lpar_per_frv_fnl_code",
74+
"lpar_per_other_name",
75+
"lpar_per_hou_surname_prefix",
76+
"lpar_hou_legacy_ref",
77+
"lpar_ipp_shortname",
78+
"lpar_ipp_placement_ind",
79+
"lpar_ipp_current_ind",
80+
"lpar_ipp_ipt_code",
81+
"lpar_ipp_usr_username",
82+
"lpar_ipp_spr_printer_name",
83+
"lpar_ipp_comments",
84+
"lpar_ipp_vca_code",
85+
"lpar_ipu_aun_code",
86+
"lpar_ipp_staff_id",
87+
"lpar_ipp_cos_code",
88+
"lpar_ipp_hrv_fit_code",
89+
"lpar_type",
90+
"lpar_org_sort_code",
91+
"lpar_org_name",
92+
"lpar_org_short_name",
93+
"lpar_org_frv_oty_code",
94+
"lpar_per_hou_at_risk_ind",
95+
"lpar_per_hou_hrv_ntly_code",
96+
"lpar_per_hou_hrv_sexo_code",
97+
"lpar_per_hou_hrv_rlgn_code",
98+
"lpar_per_hou_hrv_ecst_code",
99+
"lpar_org_current_ind",
100+
"lpar_hop_head_hhold_ind",
101+
"lpar_hhold_group_no",
102+
"lpar_created_date",
103+
"lpar_created_by",
104+
"lpar_modified_date",
105+
"lpar_modified_by",
106+
"lpar_per_hou_end_date",
107+
"lpar_per_hou_hrv_hpe_code",
108+
"lpar_org_dup",
109+
"tranche",
73110
]
74111
description: str = "Expect people load columns to match ordered list exactly"
75112

0 commit comments

Comments
 (0)