From: Mike Bayer Date: Sun, 27 Jan 2013 22:15:25 +0000 (-0500) Subject: - use SQL constructs here for databases that need to escape names like "data" X-Git-Tag: rel_0_8_0~27^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=684d8d4c8112b34bbe5d5e35bb2ecba1686fda4c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - use SQL constructs here for databases that need to escape names like "data" --- diff --git a/lib/sqlalchemy/testing/suite/test_ddl.py b/lib/sqlalchemy/testing/suite/test_ddl.py index c5b162413f..fc1c19362e 100644 --- a/lib/sqlalchemy/testing/suite/test_ddl.py +++ b/lib/sqlalchemy/testing/suite/test_ddl.py @@ -15,11 +15,10 @@ class TableDDLTest(fixtures.TestBase): Column('data', String(50)) ) - def _simple_roundtrip(self): + def _simple_roundtrip(self, table): with config.db.begin() as conn: - conn.execute("insert into test_table(id, data) values " - "(1, 'some data')") - result = conn.execute("select id, data from test_table") + conn.execute(table.insert().values((1, 'some data'))) + result = conn.execute(table.select()) eq_( result.first(), (1, 'some data') @@ -32,7 +31,7 @@ class TableDDLTest(fixtures.TestBase): table.create( config.db, checkfirst=False ) - self._simple_roundtrip() + self._simple_roundtrip(table) @requirements.drop_table @util.provide_metadata