Commit dd8b4e40 authored by Nicolas Wavrant's avatar Nicolas Wavrant

testCMFCategory: update test that was testing nothing

Before the change testing the value set for category membership,
"p1.setCareerSubordination(o1)" was not raising, making this test
useless in reality. With the change, this now raises, but with a
different message.
parent b330fb33
......@@ -807,12 +807,12 @@ class TestCMFCategory(ERP5TypeTestCase):
else:
o1 = organisation_module._getOb(self.id1)
try:
p1.setCareerSubordination(o1)
except Exception, e:
self.assertTrue(isinstance(e, TypeError))
self.assertEqual(e.args[0], 'Category must be of string, tuple of '
'string or list of string type.')
self.assertRaisesRegexp(
TypeError,
'This method only takes a string or an iterable of strings as parameter.',
p1.setCareerSubordination,
o1
)
def test_23_getCategoryChildValueList(self):
pc = self.getCategoriesTool()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment