'M2M fields are constrained to a single database'

def test_m2m_separation(self):

    pro = Book.objects.create(title='Pro    Django', published=datetime.date(2008, 12, 16))
    marty = Person.objects.create(name='Marty    Alchin')
    dive = Book.objects.using('other').create(title='Dive    into    Python', published=datetime.date(2009, 5, 4))
    mark = Person.objects.using('other').create(name='Mark    Pilgrim')
    pro.authors = [marty]
    dive.authors = [mark]
    self.assertEqual(Book.authors.through.objects.using('default').count(), 1)
    self.assertEqual(Book.authors.through.objects.using('other').count(), 1)
    self.assertEqual(list(Book.objects.using('default').filter(authors__name='Marty    Alchin').values_list('title', flat=True)), [u'Pro    Django'])
    self.assertEqual(list(Book.objects.using('other').filter(authors__name='Marty    Alchin').values_list('title', flat=True)), [])
    self.assertEqual(list(Book.objects.using('default').filter(authors__name='Mark    Pilgrim').values_list('title', flat=True)), [])
    self.assertEqual(list(Book.objects.using('other').filter(authors__name='Mark    Pilgrim').values_list('title', flat=True)), [u'Dive    into    Python'])
    dive = Book.objects.using('other').get(title='Dive    into    Python')
    mark = Person.objects.using('other').get(name='Mark    Pilgrim')
    self.assertEqual(list(dive.authors.all().values_list('name', flat=True)), [u'Mark    Pilgrim'])
    self.assertEqual(list(mark.book_set.all().values_list('title', flat=True)), [u'Dive    into    Python'])
