async def METHOD_NAME(cleanup):
    async with database:
        guido = await Author.objects.create(first_name="Guido", last_name="Van Rossum")
        post = await Post.objects.create(title="Hello, M2M", author=guido)
        news = await Category.objects.create(name="News")
        await post.categories.add(news)
        assert len(await post.categories.all()) == 1
        await post.categories.remove(news)
        assert len(await post.categories.all()) == 0
        with pytest.raises(AttributeError):
            await news.posts.add(post)
        with pytest.raises(AttributeError):
            await news.posts.remove(post)
        await post.categories.add(news)
        await post.categories.clear()
        assert len(await post.categories.all()) == 0
        await post.categories.add(news)
        await news.delete()
        assert len(await post.categories.all()) == 0