예제 #1
0
 def setUp(self):
     create_sqlite(use_metadata_from_db=False, echo=False, metadata=generate_test_metadata())
예제 #2
0
 def setUp(self):
     create_sqlite(use_metadata_from_db=False,
                   echo=False,
                   metadata=generate_test_metadata())
 def test_validator_with_cast_error(self):
     self.assertRaises(DataImporterCastException, run_validation, generate_test_metadata(), False, False, get_resource_dir('cast_error_csv'), False)
 def test_validator_with_extra_field(self):
     rtn_code = run_validation(metadata=generate_test_metadata(), missing_table_ignore=False, missing_field_ignore=False, dir_name=get_resource_dir('extra_fields'), verbose=False)
     self.assertEqual(1, rtn_code)
 def test_validator_directory_does_not_exist(self):
     rtn_code = run_validation(metadata=generate_test_metadata(), missing_table_ignore=False, missing_field_ignore=False, dir_name=get_resource_dir('no_such_dir'), verbose=False)
     self.assertEqual(1, rtn_code)
 def test_validator_with_missig_csv_ignore_table(self):
     rtn_code = run_validation(metadata=generate_test_metadata(), missing_table_ignore=True, missing_field_ignore=False, dir_name=get_resource_dir('missing_csv'), verbose=False)
     self.assertEqual(0, rtn_code)