Fix counters and add unit tests to cover new models with counters.

Review Request #2582 — Created Sept. 7, 2011 and submitted

Information

Review Board
2268

Reviewers

Fix counters and add unit tests to cover new models with counters.

This adds unit tests to cover the case of a new model with counters that
populate based on queries. Specifically, the LocalSiteProfile. In upgraded
installs, the new counter fields were being set to 0, instead of NULL, causing
all other updates to be based on that 0 counter. That's fixed in Djblets.
These new tests ensure it stays fixed for Review Board.

This also changes the Starred counts to exclude non-public review requests
owned by the site profile user. While it makes sense to include this count,
it actually doesn't work today, and it's safer to just exclude them until
we fix the logic otherwise. Even if we don't, no big deal.
Unit tests pass.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed