Skip to content

Commit

Permalink
Test helper formating arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Feb 19, 2015
1 parent fa08543 commit 80aba88
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ def test_representations(self):
self.assertEquals(str(rule), "<Application: foo>")
self.assertEquals(repr(rule), "<Application: foo>")

def test_contains_name(self):
a1 = Application({"name": "foo", "type": "applicaiton", "helper": "some helper"})
a2 = Application({"name": "foo", "type": "application", "helper": "some helper with {NAME} argument"})
self.assertFalse(a1.helper_contains_name)
self.assertTrue(a2.helper_contains_name)

def test_contains_formating(self):
a1 = Application({"name": "foo", "type": "applicaiton", "helper": "some helper"})
a3 = Application({"name": "foo", "type": "application", "helper": "some helper with {FOO} argument"})
self.assertFalse(a1.helper_contains_formating)
self.assertTrue(a3.helper_contains_formating)

def _count(self, app_name, apps):
count = 0
for a in apps:
Expand Down

0 comments on commit 80aba88

Please sign in to comment.