[SQL-CVS] r3524 - SQLObject/trunk/sqlobject/tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2008-07-23 15:42:37
|
Author: phd Date: 2008-07-23 09:41:06 -0600 (Wed, 23 Jul 2008) New Revision: 3524 Modified: SQLObject/trunk/sqlobject/tests/test_schema.py Log: Allow the test to be run without 'schema=' parameter in the DB URI. Modified: SQLObject/trunk/sqlobject/tests/test_schema.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_schema.py 2008-07-23 14:22:44 UTC (rev 3523) +++ SQLObject/trunk/sqlobject/tests/test_schema.py 2008-07-23 15:41:06 UTC (rev 3524) @@ -11,12 +11,11 @@ def test_connection_schema(): if not supports('schema'): return - conn = getConnection(schema=None) + conn = getConnection() conn.schema = None conn.query('CREATE SCHEMA test') + conn.schema = 'test' + conn.query('SET search_path TO test') setupClass(Test) Test(foo='bar') - conn = Test._connection - assert conn.schema, \ - """To test a schema you need to give a connection uri that contains a schema.""" - assert conn.queryAll("select * from %s.test" % conn.schema) + assert conn.queryAll("SELECT * FROM test.test") |