test: Add unit tests for App Login Flow (get_cookie_for_app, apply_login_cookie)#1661
Draft
sveneberth wants to merge 6 commits into
Draft
test: Add unit tests for App Login Flow (get_cookie_for_app, apply_login_cookie)#1661sveneberth wants to merge 6 commits into
sveneberth wants to merge 6 commits into
Conversation
…gin_cookie) Tests cover session creation, Set-Cookie format, redirect whitelist enforcement (fnmatch patterns, callable whitelist, star wildcard, blocked targets) and session activation via apply_login_cookie. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add unit tests for: - utils: ensure_iterable, build_content_disposition_header, parse.bool/sortorder, string.normalize_ascii/is_prefix/random - bones: BooleanBone, ColorBone, EmailBone, JsonBone, PasswordBone, PhoneBone, SelectBone - errors: all HTTP exception classes and Redirect validation - decorators: @Exposed, @internal_exposed, @force_post, @force_ssl, @cors, @access (no-user, root bypass, single/combined access rights, callable checks, offer_login) Coverage highlights: parse.py 100%, phone 98%, email 92%, color 97%, errors 99% Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consecutive dots, leading dot and trailing dot in the local part are now rejected. Previously the bone accepted 'first..last@example.com' because it only checked for valid characters, not structural dot rules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s; extend string/numeric New test files: - CredentialBone: isInvalid, singleValueFromClient, multiple/languages restrictions, unserialize - UidBone: init validation (pattern wildcards, fillchar, readOnly, multiple), structure() - RawBone: passthrough behavior, type_suffix, no HTML escaping - SelectCountryBone: ISO2/ISO3 modes, subgroups (dach/eu), custom list, sorting, singleValueUnserialize ISO code conversion - SpatialBone: haversine distance (Munich↔Berlin, equator, symmetry), bounds validation, getGridSize, isInvalid, isEmpty, singleValueFromClient, singleValueUnserialize Extended: - StringBone: isInvalid (max/min_length), init validation, type_coerce_single_value, singleValueFromClient with/without escape_html - NumericBone: singleValueFromClient (comma decimal, min/max bounds, precision, invalid str), init validation (min/max out of range), getEmptyValue type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests cover session creation, Set-Cookie format, redirect whitelist enforcement (fnmatch patterns, callable whitelist, star wildcard, blocked targets) and session activation via apply_login_cookie.