def test_from_parts(self): project = self.get_project() profile = self.get_profile() config = dbt.config.RuntimeConfig.from_parts(project, profile, {}) self.assertEqual(config.cli_vars, {}) self.assertEqual(config.to_profile_info(), profile.to_profile_info()) # we should have the default quoting set in the full config, but not in # the project # TODO(jeb): Adapters must assert that quoting is populated? expected_project = project.to_project_config() self.assertEqual(expected_project['quoting'], {}) expected_project['quoting'] = { 'database': True, 'identifier': True, 'schema': True, } self.assertEqual(config.to_project_config(), expected_project)
def test_from_parts(self): project = self.get_project() profile = self.get_profile() config = dbt.config.RuntimeConfig.from_parts(project, profile, self.args) self.assertEqual(config.cli_vars, {}) self.assertEqual(config.to_profile_info(), profile.to_profile_info()) # we should have the default quoting set in the full config, but not in # the project # TODO(jeb): Adapters must assert that quoting is populated? expected_project = project.to_project_config() self.assertEqual(expected_project['quoting'], {}) expected_project['quoting'] = { 'database': True, 'identifier': True, 'schema': True, } self.assertEqual(config.to_project_config(), expected_project)