• 
      

    Added unit tests for djblets.auth.views.register. These unit tests cover registering a new user and attempting to register a user with an existing account/username.

    Review Request #9219 — Created Sept. 24, 2017 and discarded

    Information

    Djblets
    release-0.10.x

    Reviewers

    Added unit tests for djblets.auth.views.register. These unit tests cover registering a new user and attempting to register a user with an existing account/username.

    Stepped through djblets.auth.views.register using ipdb to make sure that each test was hitting the proper registration flows.

    Description From Last Updated

    Pro tip: You can set a column width of 79 in pycharm settings. It is under Editor -> Code Style …

    brennie brennie

    Please limit your summary to 50-ish chars. Wrap summary & description at 72 chars.

    brennie brennie

    Needs a file-level docstring that describes what the file is or does. In this case "Unit tests for djblets.auth.views." would …

    brennie brennie

    These can be grouped together since they are both 3rd party imports.

    brennie brennie

    Needs a docstring.

    brennie brennie

    Needs a docstring.

    brennie brennie

    E501 line too long (86 > 79 characters)

    reviewbot reviewbot

    E501 line too long (101 > 79 characters)

    reviewbot reviewbot

    E501 line too long (84 > 79 characters)

    reviewbot reviewbot

    Formatting to flake8's complaints can be hard, so try: self.csrf_client.get( reverse('register'), { 'username': 'testUser', 'password1': 'password', 'password2': 'password', 'email': 'user@gmail.com', …

    brennie brennie

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (93 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (90 > 79 characters)

    reviewbot reviewbot

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (93 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (95 > 79 characters)

    reviewbot reviewbot

    Docstring.

    brennie brennie

    Blank line between these.

    brennie brennie

    E501 line too long (90 > 79 characters)

    reviewbot reviewbot

    E501 line too long (86 > 79 characters)

    reviewbot reviewbot

    E501 line too long (100 > 79 characters)

    reviewbot reviewbot

    E501 line too long (85 > 79 characters)

    reviewbot reviewbot

    E501 line too long (81 > 79 characters)

    reviewbot reviewbot

    E501 line too long (90 > 79 characters)

    reviewbot reviewbot

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (91 > 79 characters)

    reviewbot reviewbot

    E501 line too long (93 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (88 > 79 characters)

    reviewbot reviewbot

    E501 line too long (109 > 79 characters)

    reviewbot reviewbot

    E501 line too long (97 > 79 characters)

    reviewbot reviewbot

    Undo.

    brennie brennie

    Undo.

    brennie brennie

    I'm not sure what we should put in here. Maybe ask David or Christian what they think?

    brennie brennie

    W291 trailing whitespace

    reviewbot reviewbot

    W291 trailing whitespace

    reviewbot reviewbot

    W291 trailing whitespace

    reviewbot reviewbot

    W291 trailing whitespace

    reviewbot reviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    brennie
    1. 
        
    2. Show all issues

      Pro tip: You can set a column width of 79 in pycharm settings. It is under Editor -> Code Style -> Python -> Wrapping and Braces.

      1. Thank you, after reviewboard complained I had set it for all all languages in pycharm, but couldn't figure out how to set it for just python.

    3. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
      Show all issues

      Needs a file-level docstring that describes what the file is or does. In this case "Unit tests for djblets.auth.views." would be fine.

    4. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
       
       
       
       
       
      Show all issues

      These can be grouped together since they are both 3rd party imports.

    5. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
      Show all issues

      Needs a docstring.

    6. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
      Show all issues

      Needs a docstring.

    7. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
       
       
       
       
       
      Show all issues

      Formatting to flake8's complaints can be hard, so try:

      self.csrf_client.get(
          reverse('register'),
          {
              'username': 'testUser',
              'password1': 'password',
              'password2': 'password',
              'email': 'user@gmail.com',
              'first_name': 'test',
              'last_name': 'user',
          },
      )
      
    8. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
      Show all issues

      Docstring.

    9. djblets/auth/tests/test_views.py (Diff revision 1)
       
       
       
      Show all issues

      Blank line between these.

    10. djblets/auth/views.py (Diff revision 1)
       
       
      Show all issues

      Undo.

    11. djblets/auth/views.py (Diff revision 1)
       
       
      Show all issues

      Undo.

    12. djblets/testing/templates/djblets_testing/register.html (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      I'm not sure what we should put in here. Maybe ask David or Christian what they think?

    13. 
        
    SL
    Review request changed
    Commit:
    b2d378cbe3851b1150c3c7012f7690e65bf9393d
    13642a349d60435dfbc18e2d02ed7aaafab16bc5

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    SL
    1. 
        
    2. djblets/auth/tests/test_views.py (Diff revision 2)
       
       

      Is there a pycharm setting for deleting trailing whitespaces automatically on save?

    3. 
        
    brennie
    1. 
        
    2. Show all issues

      Please limit your summary to 50-ish chars.

      Wrap summary & description at 72 chars.

      1. Also, for your convenience, there is a setting in PyCharm that lets you strip trailing whitespace on save: Editor -> General -> Other -> Strip Trailing spaces on Save: Modified lines.

    3. 
        
    david
    Review request changed
    Status:
    Discarded