def METHOD_NAME(mailoutbox):
    """Test event filtering logic for thank you emails."""
    eight_weeks_ago = timezone.now() - timezone.timedelta(weeks=8)
    should_be_included = Event.objects.create(
        city="should be included", is_on_homepage=True, date=eight_weeks_ago, email="first@djangogirls.org"
    )
    Event.objects.create(
        city="not on homepage", is_on_homepage=False, date=eight_weeks_ago, email="second@djangogirls.org"
    )
    Event.objects.create(
        city="uncertain date",
        is_on_homepage=True,
        date=ApproximateDate(year=eight_weeks_ago.year, month=eight_weeks_ago.month),
        email="third@djangogirls.org",
    )
    Event.objects.create(
        city="data already provided",
        is_on_homepage=True,
        date=eight_weeks_ago,
        applicants_count=1,
        attendees_count=1,
        email="fourth@djangogirls.org",
    )
    Event.objects.create(
        city="already sent",
        is_on_homepage=True,
        date=eight_weeks_ago,
        submit_information_email_sent=timezone.now(),
        email="fifth@djangogirls.org",
    )
    handle_emails.send_submit_information_emails()
    # Only a single event should have been picked up
    assert len(mailoutbox) == 1
    assert should_be_included.city in mailoutbox[0].subject