~lifeless/storm/bug-620615

« back to all changes in this revision

Viewing changes to tests/store/sqlite.py

  • Committer: Gustavo Niemeyer
  • Date: 2008-06-18 23:13:04 UTC
  • mto: (235.2.21 need-for-speed-revenge)
  • mto: This revision was merged to the branch mainline in revision 245.
  • Revision ID: gustavo@niemeyer.net-20080618231304-iww2kewacv2ux78v
Simplify the calling semantics of _when in the expr module, as
suggested by James.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        self.database = SQLite(URI("sqlite:" + self.make_path()))
42
42
 
43
43
    def create_tables(self):
44
 
        connection = self.database.connect()
 
44
        connection = self.connection
45
45
        connection.execute("CREATE TABLE foo "
46
46
                           "(id INTEGER PRIMARY KEY,"
47
47
                           " title VARCHAR DEFAULT 'Default Title')")
81
81
        self.database = SQLite(URI("sqlite:" + self.make_path()))
82
82
 
83
83
    def create_tables(self):
84
 
        connection = self.database.connect()
85
 
        connection.execute("CREATE TABLE foo "
86
 
                           "(id INTEGER PRIMARY KEY,"
87
 
                           " title VARCHAR DEFAULT 'Default Title')")
88
 
        connection.commit()
 
84
        self.connection.execute("CREATE TABLE foo "
 
85
                                "(id INTEGER PRIMARY KEY,"
 
86
                                " title VARCHAR DEFAULT 'Default Title')")
 
87
        self.connection.commit()
89
88
 
90
89
    def drop_tables(self):
91
90
        pass