Skip to content

Commit

Permalink
removed user from unauthorised put
Browse files Browse the repository at this point in the history
  • Loading branch information
SemVerTsar committed Oct 28, 2014
1 parent 4c51b3f commit 3e62254
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions user_management/api/avatar/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,13 @@ def test_unauthenticated_put(self):
The view should respond with a 401 response, confirming the user
is unauthorised to put to the view.
"""
user = UserFactory.create()
data = {'avatar': SIMPLE_PNG}

request = APIRequestFactory().put('/', data=data)
view = self.view_class.as_view()
response = view(request)

self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)

user = User.objects.get(pk=user.pk)
self.assertFalse(user.avatar)

def test_authenticated_put(self):
user = UserFactory.create()
data = {'avatar': SIMPLE_PNG}
Expand Down

0 comments on commit 3e62254

Please sign in to comment.