Update DataGrid unit tests to use assertQueries().

Review Request #12364 — Created June 12, 2022 and submitted

Information

Review Board
release-5.0.x

Reviewers

This enhances the datagrid unit tests to use assertQueries() instead
of assertNumQueries(). This gives us greater insight into the queries
being executed when rendering a datagrid, and will help with performance
tuning going forward.

A number of datagrid unit tests lacked any query-related assertions.
This change adds these, and in the process has uncovered some major
performance issues. These will be resolved in upcoming changes.

Unit tests pass.

Summary ID
Update DataGrid unit tests to use assertQueries().
This enhances the datagrid unit tests to use `assertQueries()` instead of `assertNumQueries()`. This gives us greater insight into the queries being executed when rendering a datagrid, and will help with performance tuning going forward. A number of datagrid unit tests lacked any query-related assertions. This change adds these, and in the process has uncovered some major performance issues. These will be resolved in upcoming changes.
9332521223904bd15af0085858b0c3342500c365
Description From Last Updated

This needs a docstring.

daviddavid

This needs a docstring.

daviddavid

Might be good to add num_statements= here

maubinmaubin
chipx86
david
  1. 
      
  2. reviewboard/datagrids/tests.py (Diff revision 2)
     
     
    Show all issues

    This needs a docstring.

  3. reviewboard/datagrids/tests.py (Diff revision 2)
     
     
    Show all issues

    This needs a docstring.

  4. 
      
maubin
  1. 
      
  2. reviewboard/datagrids/tests.py (Diff revision 2)
     
     
    Show all issues

    Might be good to add num_statements= here

  3. 
      
chipx86
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (847edda)