Skip to content

Conversation

@dariomesic
Copy link

Purpose

This PR resolves the TODO in test_build_changes.py which suggested using better HTML content checking.

The previous test implementation used simple string in htmltext assertions. This method is brittle and can easily fail if HTML tags, CSS classes, or attributes are changed in the future.

This commit refactors the test_build function to:

  1. Parse the generated HTML using BeautifulSoup.
  2. Validate the document structure, not just the raw text.
  3. Introduce a find_change_item helper function to make the test cleaner, more robust, and easier to maintain.

This makes the test more resilient to future template changes.

@dariomesic dariomesic marked this pull request as ready for review October 28, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant