summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-07-09 21:35:01 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-07-09 21:43:20 +0200
commita2b4af3a1a145b8b0eb018e590f0beb0e428c5d2 (patch)
tree9594532a9668ce8ef8c4e6eaddef54c11734f3dc
parentd200405471957fa67e21b2cbf08390cefbcd8482 (diff)
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 404870ee1f0d15f6b81d0e0b059068b1f020b2f1 from master.
-rw-r--r--tests/requests/tests.py2
-rw-r--r--tests/transactions_regress/tests.py7
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index d9120db4e7..9e1cf19307 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -679,7 +679,7 @@ class RequestsTests(SimpleTestCase):
@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):
diff --git a/tests/transactions_regress/tests.py b/tests/transactions_regress/tests.py
index 8078f1d128..b1d1e613f6 100644
--- a/tests/transactions_regress/tests.py
+++ b/tests/transactions_regress/tests.py
@@ -190,10 +190,9 @@ class TestTransactionClosing(IgnorePendingDeprecationWarningsMixin, TransactionT
"""
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.