From 0d178aff471307d2e585891b6c09f1ec048b13a1 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 4 Nov 2011 10:28:50 -0700 Subject: [PATCH] import TwillException so we can raise it --- tests/test-utils.py | 11 +++++++++++ twill/utils.py | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 tests/test-utils.py diff --git a/tests/test-utils.py b/tests/test-utils.py new file mode 100644 index 0000000..45e3cdd --- /dev/null +++ b/tests/test-utils.py @@ -0,0 +1,11 @@ +import nose.tools + +from twill import utils +from twill.errors import TwillException + + +class TestMakeBoolean: + + @nose.tools.raises(TwillException) + def test_twill_exception(self): + utils.make_boolean('no') diff --git a/twill/utils.py b/twill/utils.py index fd305de..b1f78d8 100644 --- a/twill/utils.py +++ b/twill/utils.py @@ -15,6 +15,8 @@ from mechanize._util import time from mechanize._http import HTTPRefreshProcessor from mechanize import BrowserStateError +from twill.errors import TwillException + class ResultWrapper: """