def test_delete_session_entity_type(capsys):
    intent_ids = intent_management._get_intent_ids(PROJECT_ID,
                                                   INTENT_DISPLAY_NAME)

    for intent_id in intent_ids:
        intent_management.delete_intent(PROJECT_ID, intent_id)

    intent_management.list_intents(PROJECT_ID)
    out, _ = capsys.readouterr()

    assert INTENT_DISPLAY_NAME not in out

    intent_ids = intent_management._get_intent_ids(PROJECT_ID,
                                                   INTENT_DISPLAY_NAME)

    assert len(intent_ids) == 0
def test_delete_session_entity_type(capsys):
    intent_ids = intent_management._get_intent_ids(
        PROJECT_ID, INTENT_DISPLAY_NAME)

    for intent_id in intent_ids:
        intent_management.delete_intent(PROJECT_ID, intent_id)

    intent_management.list_intents(PROJECT_ID)
    out, _ = capsys.readouterr()

    assert INTENT_DISPLAY_NAME not in out

    intent_ids = intent_management._get_intent_ids(
        PROJECT_ID, INTENT_DISPLAY_NAME)

    assert len(intent_ids) == 0