Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] tests : Refactoring of the tests #296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 21, 2024

  1. [REF] tests : Refactoring of the tests

    Enhance Testing Framework, Refactor XML Parsing with etree,
    and Enforce Field Constraints. To streamline the testing process
    and reduce the burden of code reviews, this commit introduces a
    multitude of enhancements and refactors within the codebase.
    Key improvements include:
     - New tests for manifests and xml
     - A shift from regex-based to etree-based XML parsing
     - Implementation of strict field constraints
    
    - Added Extensive Tests:
      - Implemented numerous new tests to simplify testing and reduce review complexity.
      - Expanded coverage across multiple modules to ensure robustness.
    
    - Refactored XML Parsing:
      - Replaced regex-based parsing with `etree` from the `lxml`
         library for improved accuracy and maintainability.
      - Enhanced error handling and logging for XML processing.
    
    - Implemented `check_fields` and `FIELDS_NOT_TO_SET_DIRECTLY`:
      - Introduced the `check_fields` function to validate that certain
        fields are not set directly in XML data because those are readonly
        fields computed fields.
      - Defined `FIELDS_NOT_TO_SET_DIRECTLY` to specify fields across various
        model fields that should be defined in their related model.
    
    - Updated Manifest Validation:
      - Strengthened manifest checks to include mandatory keys and correct
         dependency ordering.
      - Ensured theme dependencies are listed last and dependencies are
        alphabetically sorted.
    
    These changes significantly improve the maintainability and reliability
    of the codebase by enhancing test coverage, ensuring proper XML handling,
    and enforcing strict field constraints. The refactored XML parsing with
    `etree` provides a more robust solution, while the `check_fields` mechanism
    safeguards against improper data manipulation. Enhanced manifest validations
    and logging facilitate smoother development and deployment processes.
    jaeschwa committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    97142ec View commit details
    Browse the repository at this point in the history