tests for parsing
This commit is contained in:
parent
cdcd613db0
commit
64eac7f6cc
@ -36,7 +36,7 @@ def test_map_features_to_targets():
|
||||
|
||||
def test_preprocess_features(exmpl_api_sales_prognosis_resp):
|
||||
resp = exmpl_api_sales_prognosis_resp
|
||||
df = forecast.parse_api_resp_to_df(resp)
|
||||
df = forecast._parse_api_resp_to_df(resp)
|
||||
feat_mapping: dict[str, str] = {
|
||||
"artikelId": "artikel_refid",
|
||||
"firmaId": "firma_refid",
|
||||
@ -53,7 +53,7 @@ def test_preprocess_features(exmpl_api_sales_prognosis_resp):
|
||||
)
|
||||
|
||||
assert all(feat in df.columns for feat in feat_mapping.keys())
|
||||
data = parse.preprocess_features(df, feat_mapping, target_features)
|
||||
data = parse.process_features(df, feat_mapping, target_features)
|
||||
assert len(data.columns) == len(df.columns)
|
||||
assert (data.columns != df.columns).any()
|
||||
assert any(feat not in data.columns for feat in feat_mapping.keys())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user