File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22omit =
33 data_pipeline/prototypes/*
44 data_pipeline/shared/table_configs.py
5- data_pipeline/stages/*
65 */__init__.py
Original file line number Diff line number Diff line change @@ -131,47 +131,17 @@ def test_log_info_appends_only_to_info(empty_report):
131131# ------------------------------------------------------------
132132
133133
134- def test_base_validation_fails_on_missing_allowed_column (
134+ def test_base_validation_fails_on_missing_required_column (
135135 empty_report ,
136136 valid_customers_df ,
137137):
138- df = valid_customers_df .drop (columns = "customer_city " )
138+ df = valid_customers_df .drop (columns = "customer_state " )
139139 ok = run_base_validations (
140140 df ,
141141 "df_customers" ,
142142 ["customer_id" ],
143143 [
144144 "customer_id" ,
145- "customer_zip_code_prefix" ,
146- "customer_city" ,
147- "customer_state" ,
148- ],
149- empty_report ,
150- )
151-
152- assert ok is False
153- assert len (empty_report ["errors" ]) == 1
154- assert any (
155- "df_customers: missing allowed column(s): ['customer_city']" in error
156- for error in empty_report ["errors" ]
157- )
158-
159-
160- def test_base_validation_fails_on_invalid_extra_column (
161- empty_report ,
162- valid_customers_df ,
163- ):
164-
165- df = valid_customers_df
166- df ["extra_column" ] = ["extra" , "extra" ]
167- ok = run_base_validations (
168- df ,
169- "df_customers" ,
170- ["customer_id" ],
171- [
172- "customer_id" ,
173- "customer_zip_code_prefix" ,
174- "customer_city" ,
175145 "customer_state" ,
176146 ],
177147 empty_report ,
@@ -180,7 +150,7 @@ def test_base_validation_fails_on_invalid_extra_column(
180150 assert ok is False
181151 assert len (empty_report ["errors" ]) == 1
182152 assert any (
183- "df_customers: non-allowed extra column(s): ['extra_column ']" in error
153+ "df_customers: missing required column(s): ['customer_state ']" in error
184154 for error in empty_report ["errors" ]
185155 )
186156
You can’t perform that action at this time.
0 commit comments