def METHOD_NAME():
    """Test password generator."""
    assert len(password_generator()) == 8
    assert len(password_generator(length=12)) == 12
    assert password_validator(password_generator())
    with pytest.raises(Exception):
        password_generator(length=2)
        password_generator(length=3, special_char=True)