def METHOD_NAME(
    os_mock, get_template_mock, HTML_mock, fulfilled_order, customer_user, gift_card
):
    get_template_mock.return_value.render = Mock(return_value="<html></html>")
    os_mock.path.join.return_value = "test"
    previous_current_balance = gift_card.current_balance
    gift_card.current_balance = Money(Decimal(5.0), "USD")
    gift_card.save(update_fields=["current_balance_amount"])
    balance_data = [(gift_card, previous_current_balance.amount)]
    gift_cards_used_in_order_event(balance_data, fulfilled_order, customer_user, None)
    content, creation = generate_invoice_pdf(fulfilled_order.invoices.first())
    get_template_mock.return_value.render.assert_called_once_with(
        {
            "invoice": fulfilled_order.invoices.first(),
            "creation_date": datetime.now(tz=pytz.utc).strftime("%d %b %Y"),
            "order": fulfilled_order,
            "gift_cards_payment": previous_current_balance - gift_card.current_balance,
            "font_path": "file://test",
            "products_first_page": list(fulfilled_order.lines.all()),
            "rest_of_products": [],
        }
    )
    HTML_mock.assert_called_once_with(
        string=get_template_mock.return_value.render.return_value
    )