Esempio n. 1
0
 def test_negative_accepted_values(self):
     schema_yaml = yaml.safe_load(flag_yaml_text)
     with self.assertRaises(AssertionError) as excinfo:
         schema.check_schema_yaml('ut_bad_flag_df', ut_bad_flag_df,
                                  schema_yaml)
     self.assertEqual(
         'Output of step ut_bad_flag_df column flag should not be null.',
         str(excinfo.exception))
Esempio n. 2
0
 def test_negative_accepted_values(self):
     schema_yaml = yaml.safe_load(city_yaml_text)
     with self.assertRaises(AssertionError) as excinfo:
         schema.check_schema_yaml('ut_bad_city_df', ut_bad_city_df,
                                  schema_yaml)
     self.assertEqual(
         'Output of step [ut_bad_city_df] column [city] should only have values '
         'in the accepted list [Amsterdam, Dublin, Frankfurt]. These values '
         'were also found [\'New York\'].', str(excinfo.exception))
Esempio n. 3
0
 def test_positive_null(self):
     schema_yaml = yaml.safe_load(flag_yaml_text)
     schema.check_schema_yaml('ut_step_df', ut_step_df, schema_yaml)
Esempio n. 4
0
 def test_positive_accepted_values(self):
     schema_yaml = yaml.safe_load(city_yaml_text)
     schema.check_schema_yaml('ut_step_df', ut_step_df, schema_yaml)
Esempio n. 5
0
 def test_schema_two_fields(self):
     '''Test to make sure two fields can be validated in the same YAML'''
     schema_yaml = yaml.safe_load(combined_yaml_text)
     schema.check_schema_yaml('ut_step_df', ut_step_df, schema_yaml)