Bugfix for tool tests without attributes.

This commit is contained in:
Nate Coraor
2011-09-02 10:16:07 -04:00
parent d9cb0a512b
commit cbb7111ea9
+2 -3
View File
@@ -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 )