Browse files

Fixed #20724 -- Test failure on SQLite.

This test failure happened if the connection's NAME was set to a file
system path, and its TEST_NAME wasn't.

Thanks Claude for the report.

Conflicts:
	tests/transactions_regress/tests.py

Backport of 404870e from master.
  • Loading branch information...
1 parent d200405 commit a2b4af3a1a145b8b0eb018e590f0beb0e428c5d2 @aaugustin aaugustin committed Jul 9, 2013
Showing with 4 additions and 5 deletions.
  1. +1 −1 tests/requests/tests.py
  2. +3 −4 tests/transactions_regress/tests.py
View
2 tests/requests/tests.py
@@ -679,7 +679,7 @@ def read(self, len=0):
@skipIf(connection.vendor == 'sqlite'
- and connection.settings_dict['NAME'] in ('', ':memory:'),
+ and connection.settings_dict['TEST_NAME'] in (None, '', ':memory:'),
"Cannot establish two connections to an in-memory SQLite database.")
class DatabaseConnectionHandlingTests(TransactionTestCase):
View
7 tests/transactions_regress/tests.py
@@ -190,10 +190,9 @@ def test_failing_query_transaction_closed_debug(self):
"""
self.test_failing_query_transaction_closed()
-@skipIf(connection.vendor == 'sqlite' and
- (connection.settings_dict['NAME'] == ':memory:' or
- not connection.settings_dict['NAME']),
- 'Test uses multiple connections, but in-memory sqlite does not support this')
+@skipIf(connection.vendor == 'sqlite'
+ and connection.settings_dict['TEST_NAME'] in (None, '', ':memory:'),
+ "Cannot establish two connections to an in-memory SQLite database.")
class TestNewConnection(IgnorePendingDeprecationWarningsMixin, TransactionTestCase):
"""
Check that new connections don't have special behaviour.

0 comments on commit a2b4af3

Please sign in to comment.