Permalink
Browse files

Fixed #13697 -- Modified multiple_database test to avoid a failure ob…

…served under Python 2.6.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 45e5fb1 commit 289f41921e5fc95ce6bfbc380d7fa761346ac0c7 @freakboy3742 freakboy3742 committed Jun 5, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/regressiontests/multiple_database/tests.py
@@ -883,7 +883,13 @@ def test_subquery(self):
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

0 comments on commit 289f419

Please sign in to comment.