Allow the API to validate extra fields for comments on condensed diffs

Review Request #7365 — Created June 2, 2015 and submitted

Information

Review Board
dvcs
c6391b1...

Reviewers

The review diff comment API can now validate the
extra_data.base_commit_id and extra_data.condensed_diff fields if
they are provided. Utility properties have been added to the
reviews.models.diff_comment.Comment model to facilitate getting and
setting the base commit ID and condensed diff status of the associated
file diff. These will be updated by JavaScript through the API so that
the correct diff will be rendered in reviews.

Unit tests have been added to verify the validation of these new API
fields.

Ran unit tests.

Description From Last Updated

It would be more efficient if you changed the first test to just check truthiness instead of explicitly comparing against …

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/test_review_comment.py
        reviewboard/webapi/resources/review_diff_comment.py
        reviewboard/reviews/models/diff_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/test_review_comment.py
        reviewboard/webapi/resources/review_diff_comment.py
        reviewboard/reviews/models/diff_comment.py
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/reviews/models/diff_comment.py (Diff revision 1)
     
     
     
    Show all issues

    It would be more efficient if you changed the first test to just check truthiness instead of explicitly comparing against None.

  3. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to dvcs (57c80d3)