summaryrefslogtreecommitdiff
path: root/tests/regressiontests/multiple_database/tests.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-06-05 06:37:52 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-06-05 06:37:52 +0000
commit289f41921e5fc95ce6bfbc380d7fa761346ac0c7 (patch)
treea12e1c576bf64d2543c7caf2852aa77b420ed1a3 /tests/regressiontests/multiple_database/tests.py
parent45e5fb1ee224e99b612072b1a50f562856d540b6 (diff)
Fixed #13697 -- Modified multiple_database test to avoid a failure observed under Python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/multiple_database/tests.py')
-rw-r--r--tests/regressiontests/multiple_database/tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py
index bae9544465..6675fdcc6c 100644
--- a/tests/regressiontests/multiple_database/tests.py
+++ b/tests/regressiontests/multiple_database/tests.py
@@ -883,7 +883,13 @@ class QueryTestCase(TestCase):
self.assertRaises(ValueError, str, qs.query)
# Evaluating the query shouldn't work, either
- self.assertRaises(ValueError, list, qs)
+ try:
+ for obj in qs:
+ pass
+ self.fail('Iterating over query should raise ValueError')
+ except ValueError:
+ pass
+
class TestRouter(object):
# A test router. The behaviour is vaguely master/slave, but the