'Regression test for #1064 and #1506
Check that we create models via the m2m relation if the remote model
has a OneToOneField.'

def test_create_models_m2m(self):

    f = Favorites(name='Fred')
    f.save()
    f.restaurants = [self.r1]
    self.assertQuerysetEqual(f.restaurants.all(), ['<Restaurant:    Demon    Dogs    the    restaurant>'])
