Clean up the review request actions tests.

Review Request #8360 — Created Aug. 29, 2016 and submitted

Information

Review Board
release-3.0.x
10c3b57...

Reviewers

This makes some major improvements to the review request actions test
suites, in order to help with test output, maintainability, and to test
things in a more fine-grained manner.

The base action tests have been split into two suites: One for the main
registry, and one for the BaseReviewRequestAction class. These have
had their unit test docstrings updated to specify the functions/classes
being tested, to help with test output, and to better specify the
conditions (rather than the results).

Some tests that tested multiple conditions have also been split up.
Other tests that tested a bit too much (like performing multiple types
of operations and checking render output for non-render tests) have been
rewritten.

The default action tests have been completely replaced. Before, they
were testing the renders of the whole page, all actions included, based
on different state, which was hard to maintain. Now, there's a test
suite per action, with each possible condition covered.

There's also some tweaks to the logic in the default actions, to help
with readability and intent.

Unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/tests/test_actions.py
        reviewboard/reviews/default_actions.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/tests/test_actions.py
        reviewboard/reviews/default_actions.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (84edc19)
Loading...