Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed Mar 6, 2020
1 parent 95c7f68 commit 43b8e28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion huntserver/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ def ajax_and_check_page(test, page, code, args={}):
test.assertEqual(response.status_code, code)
return response


def message_from_response(response):
messages = list(response.context['messages'])
if(len(messages) > 0):
return str(messages[0])
else:
return ""


def solve_puzzle_from_admin(test):
test.client.logout()
login(test, 'user5')
Expand Down Expand Up @@ -481,7 +483,7 @@ def test_account_logout(self):
response = get_and_check_page(self, 'huntserver:account_logout', 200)
login(self, 'user1')
response = self.client.get(reverse('huntserver:account_logout'), {'next': '/'})
self.assertEqual(response.status_code, 302)
self.assertEqual(response.status_code, 200)

def test_shib_login(self):
"Test the shib login view"
Expand Down

0 comments on commit 43b8e28

Please sign in to comment.