def test_slugify_keep_uppercase(): assert GetParams.slugify( s=UNSANITIZED, allowed_start=ascii_uppercase + ascii_lowercase, allowed_end=ascii_uppercase + ascii_lowercase + digits, allowed_rest=ascii_uppercase + ascii_lowercase + digits + "_", lower=False, ) == SLUG_KEEP_UPPERCASE
def test_slugify_no_chars_allowed_at_end(): assert GetParams.slugify( s=UNSANITIZED, allowed_end="", ) == ""
def test_slugify_remove_uppercase(): assert GetParams.slugify( s=UNSANITIZED, lower=False, ) == SLUG_UPPERCASE_REMOVED
def test_slugify_wrong_type_whitespace_replace(): with pytest.raises(TypeError): GetParams.slugify( s=UNSANITIZED, whitespace_replace=LIST, )
def test_slugify_no_whitespace(): assert GetParams.slugify( s=UNSANITIZED, whitespace_replace="", ) == SLUG_WHITESPACE_REMOVED
def test_slugify_wrong_type_lower(): with pytest.raises(TypeError): GetParams.slugify( s=UNSANITIZED, lower=LIST, )
def test_slugify_wrong_type_allowed_rest(): with pytest.raises(TypeError): GetParams.slugify( s=UNSANITIZED, allowed_rest=LIST, )
def test_slugify_wrong_type_s(): with pytest.raises(TypeError): GetParams.slugify(s=LIST, )
def test_slugify_okay(): assert GetParams.slugify(s=UNSANITIZED, ) == SLUG_DEFAULT
def test_slugify_no_args(): with pytest.raises(TypeError): GetParams.slugify()