Skip to content

Commit

Permalink
[Fix] Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nwuguru Sunday committed Jun 17, 2016
1 parent b9b0e49 commit 2588ad6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bucketlist/.coverage

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bucketlist/bucketlist/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
#'rest_framework.authentication.SessionAuthentication',
#'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
),
}
Expand Down
6 changes: 3 additions & 3 deletions bucketlist/bucketlists/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_login(self):
}
response = self.client.post('/api/v1/auth/login/', user_detail)
self.assertEqual(response.status_code, 200)
self.assertTrue(response.data.get('login'))
self.assertEqual(response.data.get('user') ,'sundayguru')
user_detail['username'] = 'wrong'
response = self.client.post('/api/v1/auth/login/', user_detail)
self.assertEqual(response.status_code, 400)
Expand All @@ -47,7 +47,7 @@ def setUp(self):
"""Set up base user and details for test running."""
self.register()
self.token = self.login()
self.client.credentials(HTTP_AUTHORIZATION=self.token)
self.client.credentials(HTTP_AUTHORIZATION ='DBL {}'.format(self.token))

def register(self):
user_detail = {
Expand Down Expand Up @@ -118,7 +118,7 @@ def setUp(self):
"""Set up base user and details for test running."""
self.register()
self.token = self.login()
self.client.credentials(HTTP_AUTHORIZATION=self.token)
self.client.credentials(HTTP_AUTHORIZATION ='DBL {}'.format(self.token))
bucketlists = self.create_bucketlist('test list')
self.bucketlist_id = bucketlists.data.get('id')
self.item_path = '/api/v1/bucketlists/' + \
Expand Down

0 comments on commit 2588ad6

Please sign in to comment.