Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

Commit

Permalink
tests - fix arbitrary html tag/attribute ordering expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
joncotton committed May 23, 2015
1 parent 5f9a276 commit 23fbddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions armstrong/hatband/tests/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def assert_not_allowed(self, user=None):
self.client.login(username=user.username, password=PASSWORD)
response = self.get_response()
self.assertRegexpMatches(response.content,
r'<input id="id_username"')
r'name="this_is_the_login_form"')
if user is not None:
self.client.logout()

def test_requires_staff_user(self):
self.assert_not_allowed(user=None)

pattern = r'<input id="id_username"'
pattern = r'name="this_is_the_login_form"'
self.assert_not_pattern_for_user(self.admin, pattern)
self.assert_not_pattern_for_user(self.staff, pattern)

Expand Down

0 comments on commit 23fbddd

Please sign in to comment.