Skip to content

Commit

Permalink
Remove extraneous failing tests
Browse files Browse the repository at this point in the history
The endpoint these tests were inspecting do not require
CSRF protection, thus to test for it was extraneous.

Since the upgrade, the tests began to fail as they would
always return correct values. Since the tests are no
longer necessary, they are removed.
  • Loading branch information
rajadain committed Jul 24, 2019
1 parent ee79682 commit 39e7d4c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/mmw/apps/user/tests.py
Expand Up @@ -25,12 +25,6 @@ def attempt_login(self, username, password):
response = c.post(self.LOGIN_URL, payload)
return response

def attempt_login_without_token(self, username, password):
c = Client(enforce_csrf_checks=True)
payload = {'username': username, 'password': password}
response = c.post(self.LOGIN_URL, payload)
return response

def test_no_username_returns_400(self):
response = self.attempt_login('', 'bob')
self.assertEqual(response.status_code, 400,
Expand Down Expand Up @@ -67,18 +61,6 @@ def test_good_credentials_returns_200(self):
'Incorrect server response. Expected 200 found %s'
% response.status_code)

def test_no_token_good_credentials_returns_400(self):
response = self.attempt_login_without_token('bob', 'bob')
self.assertEqual(response.status_code, 400,
'Incorrect server response. Expected 400 found %s'
% response.status_code)

def test_no_token_bad_credentials_returns_400(self):
response = self.attempt_login_without_token('badbob', 'badpass')
self.assertEqual(response.status_code, 400,
'Incorrect server response. Expected 400 found %s'
% response.status_code)


class ItsiSignupTestCase(TestCase):

Expand Down

0 comments on commit 39e7d4c

Please sign in to comment.