Added support for DELETE request to api/session and created test cases for it.

Review Request #5817 — Created May 13, 2014 and submitted

Information

Review Board
master
4590585...

Reviewers

Added support for DELETE request to api/session and created test cases for it.

Tested the base case where user delete's their own Session.

Tested when another user tries to delete another person's session.

Description From Last Updated

There should be only one blank line here.

daviddavid

You can put the """ on the same line when the docstring is just one line.

daviddavid

Remove this line.

daviddavid

Single-line if statements in python don't need parens. It's also somewhat more idiomatic to write if not request.user.is_authenticated():

daviddavid

Can you put a comma after this?

daviddavid

Can you put a comma after this?

daviddavid

Trailing whitespace.

daviddavid

Imports should be in alphabetical order (within their pep-8 defined section)

daviddavid

There's a few problems with this line. First of all, I don't know what this comment means. Second, there should …

daviddavid

'User' imported but unused

reviewbotreviewbot

'Session' imported but unused

reviewbotreviewbot

'get_session_url' imported but unused

reviewbotreviewbot

Col: 27 E203 whitespace before ':'

reviewbotreviewbot

Col: 1 W293 blank line contains whitespace

reviewbotreviewbot

'SessionStore' imported but unused

reviewbotreviewbot

'Session' imported but unused

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 34 W291 trailing whitespace

reviewbotreviewbot

Col: 1 W391 blank line at end of file

reviewbotreviewbot
david
  1. 
      
  2. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
     
    Show all issues

    There should be only one blank line here.

  3. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
     
    Show all issues

    You can put the """ on the same line when the docstring is just one line.

  4. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
    Show all issues

    Remove this line.

  5. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
    Show all issues

    Single-line if statements in python don't need parens. It's also somewhat more idiomatic to write if not request.user.is_authenticated():

  6. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
    Show all issues

    Can you put a comma after this?

  7. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
    Show all issues

    Can you put a comma after this?

  8. reviewboard/webapi/resources/session.py (Diff revision 1)
     
     
    Show all issues

    Trailing whitespace.

  9. reviewboard/webapi/tests/test_session.py (Diff revision 1)
     
     
     
     
     
     
     
    Show all issues

    Imports should be in alphabetical order (within their pep-8 defined section)

  10. Show all issues

    There's a few problems with this line. First of all, I don't know what this comment means. Second, there should be a space after the #. Third, comments should be full sentences with capitalization, and last, there's some trailing whitespace.

  11. 
      
PE
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/webapi/resources/session.py
        reviewboard/webapi/tests/test_session.py
      Ignored Files:
    
    
  2. reviewboard/webapi/resources/session.py (Diff revision 2)
     
     
    Show all issues
    Col: 27
     E203 whitespace before ':'
    
  3. reviewboard/webapi/resources/session.py (Diff revision 2)
     
     
    Show all issues
    Col: 1
     W293 blank line contains whitespace
    
  4. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  5. Show all issues
    Col: 34
     W291 trailing whitespace
    
  6. Show all issues
    Col: 1
     W391 blank line at end of file
    
  7. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/webapi/resources/session.py
        reviewboard/webapi/tests/test_session.py
      Ignored Files:
    
    
  2. reviewboard/webapi/resources/session.py (Diff revision 2)
     
     
    Show all issues
     'User' imported but unused
    
  3. reviewboard/webapi/resources/session.py (Diff revision 2)
     
     
    Show all issues
     'Session' imported but unused
    
  4. reviewboard/webapi/resources/session.py (Diff revision 2)
     
     
    Show all issues
     'get_session_url' imported but unused
    
  5. Show all issues
     'SessionStore' imported but unused
    
  6. Show all issues
     'Session' imported but unused
    
  7. 
      
david
  1. I'm going to make some changes to this and push it. Thanks!

  2. 
      
PE
Review request changed
Status:
Completed
Change Summary:
Pushed with changes to release-2.0.x (44d5a7d). Thanks!