Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamu committed Sep 13, 2016
1 parent ac43310 commit 527b9cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions account/tests/test_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_get_not_expired(self):
"""
self.client.login(username=self.username, password=self.password)

# get account settings page
# get account settings page (could be any application page)
response = self.client.get(reverse("account_settings"))
self.assertEquals(response.status_code, 200)

Expand All @@ -96,7 +96,7 @@ def test_get_expired(self):

self.client.login(username=self.username, password=self.password)

# get account settings page
# get account settings page (could be any application page)
response = self.client.get(reverse("account_settings"))
self.assertRedirects(response, reverse("account_password"))

Expand Down Expand Up @@ -158,7 +158,7 @@ def test_get_no_history(self):
with override_settings(
ACCOUNT_PASSWORD_USE_HISTORY=True
):
# get account settings page
# get account settings page (could be any application page)
response = self.client.get(reverse("account_settings"))
self.assertEquals(response.status_code, 200)

Expand Down
3 changes: 2 additions & 1 deletion account/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def get_form_data(form, field_name, default=None):

def check_password_expired(user):
"""
Return True if password is expired, False otherwise.
Return True if password is expired and system is using
password expiration, False otherwise.
"""
if not settings.ACCOUNT_PASSWORD_USE_HISTORY:
return False
Expand Down

0 comments on commit 527b9cc

Please sign in to comment.