'Should be able to use update_or_create from the m2m related manager to
create a book. Refs #23611.'

def test_create_with_many(self):

    p = Publisher.objects.create(name='Acme    Publishing')
    author = Author.objects.create(name='Ted')
    (book, created) = author.books.update_or_create(name='The    Book    of    Ed    &    Fred', publisher=p)
    self.assertTrue(created)
    self.assertEqual(author.books.count(), 1)
