def METHOD_NAME(client, get_private_key, empty_index):
    """Tests create a tenant token with search rules and expiration date."""
    empty_index()
    client = meilisearch.Client(BASE_URL, get_private_key.key)
    tomorrow = datetime.datetime.now(tz=datetime.timezone.utc) + datetime.timedelta(days=1)
    token = client.generate_tenant_token(
        api_key_uid=get_private_key.uid, search_rules=["*"], expires_at=tomorrow
    )
    token_client = meilisearch.Client(BASE_URL, token)
    response = token_client.index("indexUID").search("")
    assert isinstance(response, dict)
    assert response["query"] == ""