|
@@ -126,8 +126,9 @@ class TestInit(FieldGroupTestCase):
|
126
|
126
|
# TODO Voir si on garde le return False de Model.component() ou si on utilise plutôt une exception EmComponentNotExistError en modifiant le reste du code source pour gérer ce cas
|
127
|
127
|
self.assertFalse(EM_TEST_OBJECT.component(baduid), msg="Should be False because fieldgroup with id " + str(baduid) + " should not exist")
|
128
|
128
|
self.assertFalse(EM_TEST_OBJECT.component(badname), msg="Should be False because fieldgroup with id " + str(badname) + " should not exist")
|
129
|
|
- self.assertFalse(EM_TEST_OBJECT.component(print), msg="Should be False when crazy arguments are given")
|
130
|
|
- self.assertFalse(EM_TEST_OBJECT.component(['hello', 'world']), msg="Should be False when crazy arguments are given")
|
|
129
|
+ self.assertFalse(EM_TEST_OBJECT.component(print), msg="Should be False when a function name is given as argument")
|
|
130
|
+ with self.assertRaises(TypeError, msg="Should raise when crazy arguments are given"):
|
|
131
|
+ fieldgroup = EM_TEST_OBJECT.component(['hello', 'world'])
|
131
|
132
|
|
132
|
133
|
|
133
|
134
|
'''
|