Skip to content

Commit

Permalink
Issue webcompat#929 - Removed the wrong status code passed in views.p…
Browse files Browse the repository at this point in the history
…y that caused the tests to fail
  • Loading branch information
deepthivenkat committed Mar 14, 2016
1 parent c844bed commit cab3a29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def test_activity_page_401_if_not_logged_in(self):
rv = self.app.get('/me')
self.assertEqual(rv.status_code, 401)

def test_activity_page_403_view_other_user_activity(self):
'''Test to check that another user activity is not displayed.'''
rv = self.app.get('/activity/random_user_not_me')
self.assertEqual(rv.status_code, 403)

def test_issue_int(self):
'''Test issues and integer for:
Expand Down
2 changes: 1 addition & 1 deletion webcompat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def api_message(code):
'message': ERROR_DICT[code],
}
resp = jsonify(message)
resp.status_code = 404
resp.status_code = code
return resp


Expand Down

1 comment on commit cab3a29

@karlcow
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deepthivenkat you see here I would have made two separate commits with short messages. Because there are two different things. Atomic commits or at least touching different parts of the code is good for future maintenance.

Please sign in to comment.