'Cascaded deletions of Generic Key relations issue queries on the right database'

def test_generic_key_deletion(self):

    dive = Book.objects.using(u'other').create(title=u'Dive    into    Python', published=datetime.date(2009, 5, 4))
    review = Review.objects.using(u'other').create(source=u'Python    Weekly', content_object=dive)
    self.assertEqual(Book.objects.using(u'default').count(), 0)
    self.assertEqual(Review.objects.using(u'default').count(), 0)
    self.assertEqual(Book.objects.using(u'other').count(), 1)
    self.assertEqual(Review.objects.using(u'other').count(), 1)
    dive.delete(using=u'other')
    self.assertEqual(Book.objects.using(u'default').count(), 0)
    self.assertEqual(Review.objects.using(u'default').count(), 0)
    self.assertEqual(Book.objects.using(u'other').count(), 0)
    self.assertEqual(Review.objects.using(u'other').count(), 0)
