diff --git a/src/tests/unit/validation_metadata/test_validation_metadata.py b/src/tests/unit/validation_metadata/test_validation_metadata.py index 33f8c4e1..223e09b0 100644 --- a/src/tests/unit/validation_metadata/test_validation_metadata.py +++ b/src/tests/unit/validation_metadata/test_validation_metadata.py @@ -25,11 +25,11 @@ def test_validate_metadata_of_one_table_without_fk_key_in_train_process( ): """ Test the validation of the metadata of one table contained only the primary key - used in the training process + during the training process """ rp_logger.info( "Test the validation of the metadata of one table contained the primary key " - "used in the training process" + "during the training process" ) test_metadata = { "test_table": { @@ -79,12 +79,12 @@ def test_validate_metadata_of_one_table_without_fk_key_in_train_process_without_ """ Test the validation of the metadata of one table contained only the primary key - used in the training process + during the training process with 'validation_source' set to 'False' """ rp_logger.info( "Test the validation of the metadata of one table " - "contained only the primary ke used in the training process " + "contained only the primary key during the training process " "with 'validation_source' set to 'False'" ) test_metadata = { @@ -230,11 +230,11 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_train_process( """ Test the validation of the metadata of related tables contained the primary key and the foreign key - used in the training process + during the training process """ rp_logger.info( "Test the validation of the metadata of related tables " - "contained only the primary key and the foreign key used in the training process" + "contained only the primary key and the foreign key during the training process" ) test_metadata = { "table_a": { @@ -276,8 +276,8 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_train_process( validator.run() assert validator.mapping == { "fk_id": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == test_metadata @@ -308,12 +308,12 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_train_process_withou """ Test the validation of the metadata of related tables contained the primary key and the foreign key - used in the training process with 'validation_source' set to 'False' + during the training process with 'validation_source' set to 'False' """ rp_logger.info( "Test the validation of the metadata of related tables " "contained the primary key and the foreign key " - "used in the training process with 'validation_source' set to 'False'" + "during the training process with 'validation_source' set to 'False'" ) test_metadata = { "table_a": { @@ -350,8 +350,8 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_train_process_withou validator.run() assert validator.mapping == { "fk_id": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == test_metadata @@ -382,11 +382,11 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_train_proces """ Test the validation of the metadata of related tables contained several foreign keys - used in the training process + during the training process """ rp_logger.info( "Test the validation of the metadata of related tables contained several foreign keys " - "used in the training process" + "during the training process" ) test_metadata = { "table_a": { @@ -436,12 +436,12 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_train_proces validator.run() assert validator.mapping == { "fk_1": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] }, "fk_2": { - "parent_columns": ["name"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["name"] } } assert validator.merged_metadata == test_metadata @@ -472,12 +472,12 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_train_withou """ Test the validation of the metadata of related tables contained several foreign keys - used in the training process + during the training process with 'validation_source' set to 'False' """ rp_logger.info( "Test the validation of the metadata of related tables contained several foreign keys " - "used in the training process with 'validation_source' set to 'False" + "during the training process with 'validation_source' set to 'False" ) test_metadata = { "table_a": { @@ -522,12 +522,12 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_train_withou validator.run() assert validator.mapping == { "fk_1": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] }, "fk_2": { - "parent_columns": ["name"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["name"] } } assert validator.merged_metadata == test_metadata @@ -561,11 +561,11 @@ def test_validate_metadata_of_one_table_without_fk_key_in_infer_process( ): """ Test the validation of the metadata of one table - contained the primary key used in the inference process + contained the primary key during the inference process """ rp_logger.info( "Test the validation of the metadata of one table contained the primary key " - "used in the inference process" + "during the inference process" ) test_metadata = { "test_table": { @@ -619,11 +619,11 @@ def test_validate_metadata_of_related_tables_without_fk_key_in_infer_process( """ Test the validation of the metadata of related tables contained only the primary key and the unique key - used in the inference process + during the inference process """ rp_logger.info( "Test the validation of the metadata of related tables " - "contained only the primary key and the unique key used in the inference process" + "contained only the primary key and the unique key during the inference process" ) test_metadata = { "table_a": { @@ -694,11 +694,11 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_infer_process( """ Test the validation of the metadata of related tables contained the primary key and the foreign key - used in the inference process + during the inference process """ rp_logger.info( "Test the validation of the metadata of related tables " - "contained only the primary key and the foreign key used in the inference process" + "contained only the primary key and the foreign key during the inference process" ) test_metadata = { "table_a": { @@ -743,8 +743,8 @@ def test_validate_metadata_of_related_tables_with_fk_key_in_infer_process( validator.run() assert validator.mapping == { "fk_id": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == test_metadata @@ -777,11 +777,11 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_infer_proces ): """ Test the validation of the metadata of related tables - contained several foreign keys used in the inference process + contained several foreign keys during the inference process """ rp_logger.info( "Test the validation of the metadata of related tables contained several foreign keys " - "used in the inference process" + "during the inference process" ) test_metadata = { "table_a": { @@ -834,12 +834,12 @@ def test_validate_metadata_of_related_tables_with_several_fk_key_in_infer_proces validator.run() assert validator.mapping == { "fk_1": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] }, "fk_2": { - "parent_columns": ["name"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["name"] } } assert validator.merged_metadata == test_metadata @@ -907,8 +907,8 @@ def test_validate_incomplete_metadata_contained_fk_key_in_train_process_without_ validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1125,8 +1125,8 @@ def test_validate_incomplete_metadata_contained_fk_key_in_train_process_with_gen validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1231,8 +1231,8 @@ def test_validate_incomplete_metadata_in_infer_process( validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1381,8 +1381,8 @@ def test_validate_incomplete_metadata_with_absent_parent_metadata_in_metadata_st validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } message = ( @@ -1450,8 +1450,8 @@ def test_validate_incomplete_metadata_with_wrong_referential_integrity( validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_d" + "parent_table": "table_d", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1509,11 +1509,11 @@ def test_validate_metadata_with_not_existent_destination( rp_logger ): """ - Test the validation of the metadata of one table used in the inference process. + Test the validation of the metadata of one table during the inference process. The destination for the generated data is not existent. """ rp_logger.info( - "Test the validation of the metadata of one table used in the inference process. " + "Test the validation of the metadata of one table during the inference process. " "The destination of the table is not existent." ) test_metadata = { @@ -1575,14 +1575,14 @@ def test_validate_incomplete_metadata_with_absent_success_file_of_parent_table_i ): """ Test the validation of the incomplete metadata of one table contained the foreign key - used in the training process. + during the training process. The information of the parent table is present in the metadata storage, but the parent table hasn't been trained previously that's why the success file of the parent table is absent """ rp_logger.info( "Test the validation of the incomplete metadata of one table contained the foreign key " - "used in the training process. The information of the parent table is present " + "during the training process. The information of the parent table is present " "in the metadata storage, but the parent table hasn't been trained previously " "that's why the success file of the parent table is absent" ) @@ -1620,8 +1620,8 @@ def test_validate_incomplete_metadata_with_absent_success_file_of_parent_table_i mock_check_existence_of_generated_data.assert_not_called() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1683,13 +1683,13 @@ def test_validate_incomplete_metadata_with_absent_generated_of_parent_table_in_i ): """ Test the validation of the incomplete metadata of one table contained the foreign key - used in the inference process. + during the inference process. The information of the parent table is present in the metadata storage, but the generated data of the parent table hasn't been generated previously """ rp_logger.info( "Test the validation of the incomplete metadata of one table contained the foreign key " - "used in the inference process. The information of the parent table is present " + "during the inference process. The information of the parent table is present " "in the metadata storage, but the generated data of the parent table hasn't been " "generated previously" ) @@ -1721,8 +1721,8 @@ def test_validate_incomplete_metadata_with_absent_generated_of_parent_table_in_i assert mock_check_existence_of_destination.call_count == 2 assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == { @@ -1805,14 +1805,15 @@ def test_validate_incomplete_metadata_without_gen_parent_table_in_train_process_ ): """ Test the validation of the incomplete metadata of one table contained the foreign key - used in the training process with the generation of 'accuracy' or 'metrics_only' reports. + during the training process with the generation of reports that requires + the generation of the synthetic data. The information of the parent table is present in the metadata storage, but the generated data of the parent table hasn't been generated previously """ rp_logger.info( "Test the validation of the incomplete metadata of one table " "contained the foreign key used in the training process with " - "the generation of 'accuracy' or 'metrics_only' reports. " + "the generation of reports that requires the generation of the synthetic data. " "The information of the parent table is present in the metadata storage, " "but the generated data of the parent table hasn't been generated previously" ) @@ -1844,8 +1845,8 @@ def test_validate_incomplete_metadata_without_gen_parent_table_in_train_process_ validator.run() assert validator.mapping == { "fk_key": { - "parent_columns": ["id"], - "parent_table": "table_a" + "parent_table": "table_a", + "parent_columns": ["id"] } } assert validator.merged_metadata == {