예제 #1
0
    def test_validate_redshift_params_wrong_params(self):
        redshift_params = self.setup_redshift_params()
        redshift_params.pop("table_name", None)

        with pytest.raises(ValueError):
            parq.validate_redshift_params(redshift_params)

        redshift_params['tbale_name'] = "some_typoed_mess"
        with pytest.raises(KeyError):
            parq.validate_redshift_params(redshift_params)
예제 #2
0
 def test_validate_redshift_params_schema_case(self):
     redshift_params = self.setup_redshift_params()
     redshift_params['schema_name'] = 'HAmbURger_sCHemA'
     assert parq.validate_redshift_params(
         redshift_params)['schema_name'] == 'hamburger_schema'
예제 #3
0
 def test_validate_redshift_params_table_case(self):
     redshift_params = self.setup_redshift_params()
     redshift_params['table_name'] = 'hAMbURgeR_tAbLE'
     assert parq.validate_redshift_params(
         redshift_params)['table_name'] == 'hamburger_table'