def __seed(self, qualifier_map): """ 'Seed' the database with a bunch of pre-generated random records so updates can be performed in batch updates """ for i in tqdm(range(0, self.seed_rows), desc="Inserting seed data", unit="rows"): self.logger.debug(f"Inserting seed row {i}") self.__runner.db_execute(query_factory.get_insert_seed_row(SEED_TABLE_NAME, qualifier_map))
def test_get_insert_seed_row(qualifier_column_map): insert_seed_row = query_factory.get_insert_seed_row( "seed_table", qualifier_column_map ) assert ( insert_seed_row == 'INSERT INTO "seed_table" (first_name,last_name,first_name_test_arg_5) ' "VALUES ('test_value',645,'test_value');" )