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

Commit

Permalink
Using a standard if statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfm committed Feb 13, 2011
1 parent 279a66e commit 323f066
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/djangoflash/tests/testproj/app/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def test_value_in_template(self):
"""Integration: a value should be accessible by the templating system.
"""
def _assert_content(content, exists=True):
matcher = self.assertTrue if exists else self.assertFalse
if exists:
matcher = self.assertTrue
else:
matcher = self.assertFalse
matcher(self.response.content.find(content) > 0)

self.response = self.client.get(reverse(views.set_flash_var))
Expand Down

0 comments on commit 323f066

Please sign in to comment.