• 
      

    Update tests for % change in 5.0

    Review Request #14748 — Created Dec. 23, 2025 and submitted

    Information

    Django Evolution
    master

    Reviewers

    Django 5.0 changed its handling of % characters for mysql and postgres,
    and these are no longer duplicated in the SQL. This change adds
    conditions in the test data to handle this.

    Ran unit tests.

    Summary ID
    Update tests for % change in 5.0
    Django 5.0 changed its handling of % characters for mysql and postgres, and these are no longer duplicated in the SQL. This change adds conditions in the test data to handle this. Testing Done: Ran unit tests.
    mzykvrrmprzvppruzszusrnkxqwruyrs
    Description From Last Updated

    The approach I usually take for changes like this is to define a constant for the expected value once (with …

    chipx86chipx86
    chipx86
    1. 
        
    2. Show all issues

      The approach I usually take for changes like this is to define a constant for the expected value once (with a comment) and then use that in the strings. This both communicates the change in the test code in one place and reduces the number of string expectations (which has a tendency to grow in complexity).

      When we do need to differentiate string expectations based on version, we should do so mimimally, so rather than re-list every string, we only do so for the ones that differ.

    3. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (a0afc2c)