Permalink
Browse files

Add a failing test for #25.

  • Loading branch information...
ralphbean committed May 26, 2013
1 parent 8791c32 commit 5d7b43a9f41f7ae2b4f9a7d54792734ddbccdf49
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/test_params.py
@@ -73,3 +73,17 @@ def test_child(self):
assert(not hasattr(test, 'test'))
test2 = TestContainer(id='r', children=[test]).req()
assert(test2.c.q.test == 10)
def test_required(self):
""" Ensure that twc.Required works. For issue #25. """
class TestWidget(Test7):
template = "whatever"
inline_engine_name="mako"
some_param = twc.Param(default=twc.Required)
try:
TestWidget.display()
assert False, "Should have raised an exception."
except ValueError as e:
eq_(str(e), "'some_param' is a required Parameter")

0 comments on commit 5d7b43a

Please sign in to comment.