def METHOD_NAME(mailoutbox):
    """Test event filtering logic for thank you emails."""
    should_be_included = Event.objects.create(
        city="should be included",
        is_on_homepage=True,
        date=timezone.now() - timezone.timedelta(days=1),
        email="first@djangogirls.org",
    )
    Event.objects.create(
        city="not on homepage",
        is_on_homepage=False,
        date=timezone.now() - timezone.timedelta(days=1),
        email="second@djangogirls.org",
    )
    Event.objects.create(
        city="in future",
        is_on_homepage=True,
        date=timezone.now() + timezone.timedelta(days=1),
        email="third@djangogirls.org",
    )
    Event.objects.create(
        city="already sent",
        is_on_homepage=True,
        date=timezone.now() - timezone.timedelta(days=1),
        thank_you_email_sent=timezone.now(),
        email="fourth@djangogirls.org",
    )
    handle_emails.send_thank_you_emails()
    # Only a single event should have been picked up
    assert len(mailoutbox) == 1
    assert should_be_included.city in mailoutbox[0].subject