Skip to content

Commit

Permalink
Pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knrafto committed Jan 20, 2016
1 parent fda2a0f commit c323e62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_submit(self):

response = self.client.post('/api/v3/backups/', data=json.dumps(data),
headers=[('Content-Type', 'application/json')])
backup = assignment.backups(user).first()
backup = assignment.backups(user.id).first()
assert backup is not None

self.assert_200(response)
Expand All @@ -51,7 +51,7 @@ def test_submit(self):
data['submit'] = True
response = self.client.post('/api/v3/backups/', data=json.dumps(data),
headers=[('Content-Type', 'application/json')])
submission = assignment.submissions(user).first()
submission = assignment.submissions(user.id).first()
assert submission is not None

self.assert_200(response)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def test_testing_login_fail(self):
self.assert_404(response)

def test_restricted(self):
"""User should see /restricted if logged in, but not if logged out."""
"""User should see /student/ if logged in, but not if logged out."""
self.login(self.email)
response = self.client.get('/restricted')
response = self.client.get('/student/')
self.assert_200(response)

self.client.get('/logout')
response = self.client.get('/restricted')
response = self.client.get('/student/')
self.assert_redirects(response, '/login')

0 comments on commit c323e62

Please sign in to comment.