I'm trying to run this test: self.assertRaises(AttributeError, branch[0].childrennodes)
, and branch[0
] does not have an attribute childrennodes
, so it should be throwing an AttributeError
, which the assertRaises
should catch, but when I run the test, the test fails because it is throwing an AttributeError
.
Traceback (most recent call last):
File "/home/tttt/../tttt/tests.py", line 504, in test_get_categories_branch
self.assertRaises(AttributeError, branch[0].children_nodes)
AttributeError: 'Category' object has no attribute 'children_nodes'
Any ideas?