def METHOD_NAME(self, mock_site, mock_ia):
    a1 = mock_site.quicksave("/authors/OL1A", "/type/author", name="A1")
    a2 = mock_site.quicksave("/authors/OL2A", "/type/author", name="A2")
    work = mock_site.quicksave(
        "/works/OL1W",
        "/type/work",
        title="Foo",
        authors=[{"author": {"key": "/authors/OL2A"}}],
    )
    book = mock_site.quicksave("/books/OL1M", "/type/edition", title="Foo")
    assert home.format_book_data(book)['authors'] == []
    # when there is no work and authors, the authors field must be picked from the book
    book = mock_site.quicksave(
        "/books/OL1M",
        "/type/edition",
        title="Foo",
        authors=[{"key": "/authors/OL1A"}],
    )
    assert home.format_book_data(book)['authors'] == [
        {"key": "/authors/OL1A", "name": "A1"}
    ]
    # when there is work, the authors field must be picked from the work
    book = mock_site.quicksave(
        "/books/OL1M",
        "/type/edition",
        title="Foo",
        authors=[{"key": "/authors/OL1A"}],
        works=[{"key": "/works/OL1W"}],
    )
    assert home.format_book_data(book)['authors'] == [
        {"key": "/authors/OL2A", "name": "A2"}
    ]