def setUp(self):
        self.database_name = 'foobar'
        self.table_name = 'foobar'
        columns = ['col1', 'col2', 'col3']
        column_defn = [('col1', 'text'), ('col2', 'text'), ('col3', 'integer')]
        self.row = [['x', 'y', 6]]
        self.qrow = _quotestrs(self.row)
        self.filename = "b64pyshell.txt"
        self.b64row = _quotestrs(DatabaseBase._encode_2darray(self.row))
        database = Database('foobar')

        with database:
            tbl_create(database, self.database_name, column_defn)
            tbl_rows_insert(database, self.table_name, columns, self.b64row)
    def setUp(self):
        self.database_name = 'foobar'
        self.table_name = 'foobar'
        self.columns = ['col1', 'col2', 'col3']
        self.column_defn = [('col1', 'text'), ('col2', 'text'),
                            ('col3', 'integer')]
        self.row = [['x', 'y', 6]]
        self.qrow = _quotestrs(self.row)
        self.filename = "b64pyshell.txt"
        self.b64row = DatabaseBase._encode_2darray(self.row)

        self.runtime_path = "C:\\Users\\burtnolej"
        append_text_to_file(
            self.filename,
            "database_name:" + b64encode(self.database_name) + "\n")
        append_text_to_file(self.filename,
                            "table_name:" + b64encode(self.table_name) + "\n")
        append_text_to_file(self.filename,
                            "delete_flag:" + b64encode("False") + "\n")
        append_text_to_file(
            self.filename, "columns:" +
            "$$".join([b64encode(field) for field in self.columns]) + "\n")
        append_text_to_file(
            self.filename, "column_defns:" + "$$".join([
                b64encode(_name) + "^" + b64encode(_type)
                for _name, _type in self.column_defn
            ]) + "\n")
        append_text_to_file(
            self.filename, "qry_str:" +
            b64encode("select col1,col2,col3 from " + self.table_name) + "\n")

        put_2darray_in_file(self.filename, self.b64row, suffix="rows:")
        DatabaseCreateTable.create_by_file(self.filename,
                                           runtime_path=self.runtime_path)
        DatabaseInsertRows.insert_by_file(self.filename,
                                          runtime_path=self.runtime_path)