1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[soc2009/multidb] Raise an exception at an attempt to do a subquery with 2 different databases. Eventually we'll just evaluate the 2 queries seperates.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2009-07-19 21:57:08 +00:00
parent 0536cb98d5
commit 502d4982c9
5 changed files with 20 additions and 12 deletions

View File

@@ -93,3 +93,5 @@ if len(settings.DATABASES) > 1:
a.delete()
self.assertRaises(Article.DoesNotExist,
lambda: Article.objects.get(title="Django Rules!"))
self.assertRaises(ValueError,
lambda: list(Article.objects.get(pk__in=Article.objects.using('default'))))