def test_additional_parameters(self): more_params_table_config = PostgreSQLTableConfig( "db", ConnectionParams( "name", "host", "port", "user", "password", {"connect_timeout": "60", "sslmode": "disable"}, ), "table", "schema", "source", "index_schema", "index_table", index_column="id", ) self.assertIsNotNone(more_params_table_config) self.assertEqual( more_params_table_config.connection_vars, { "database": "name", "host": "host", "port": "port", "user": "******", "password": "******", "connect_timeout": "60", "sslmode": "disable", }, )
def table_config(self): return PostgreSQLTableConfig( "db", ConnectionParams("name", "host", "port", "user", "password"), "table", "schema", "source", "index_schema", "index_table", index_column="id", )
other_clean = self.r.sub(" ", other) return self_clean == other_clean class MockBytesIO(object): def __init__(self, b): self.b = b def __enter__(self, *args): return self.b def __exit__(self, *args): pass mock_conn = ConnectionParams("name", "host", "port", "user", "password") class EchoDict(object): def __getitem__(self, item): return item def __contains__(self, item): return True class MockS3Config(object): bucket = "my-bucket" prefix = "my_prefix"