From cbb7111ea9d9e41280631780b66f48e5a30d78a1 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 2 Sep 2011 10:16:07 -0400 Subject: [PATCH] Bugfix for tool tests without attributes. --- test/base/twilltestcase.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/base/twilltestcase.py b/test/base/twilltestcase.py index 298f6b6af39..928c8d65fd0 100644 --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -655,10 +655,9 @@ class TwillTestCase( unittest.TestCase ): self.home() self.visit_page( "display?hid=" + hid ) data = self.last_page() - assert_list = attributes["assert_list"] - if assert_list is not None: + if attributes is not None and attributes.get( "assert_list", None ) is not None: try: - verify_assertions(data, assert_list) + verify_assertions(data, attributes["assert_list"]) except AssertionError, err: errmsg = 'History item %s different than expected\n' % (hid) errmsg += str( err )