fix test: Validation is raised on commit, not on execute
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 05 Nov 2009 16:14:43 +0100
changeset 68 3ad8c609eacf
parent 67 52d02ce68893
child 69 383dbf5b9430
child 83 1aa97dd2a2fb
fix test: Validation is raised on commit, not on execute
test/unittest_classification.py
--- a/test/unittest_classification.py	Thu Sep 24 12:37:40 2009 +0200
+++ b/test/unittest_classification.py	Thu Nov 05 16:14:43 2009 +0100
@@ -13,8 +13,8 @@
         #self.zone = self.add_entity('Zone', name=u"Paris")
 
     def test_application_of_bad_keyword_fails(self):
-        self.assertRaises(ValidationError, self.execute,
-                          'SET K applied_to G WHERE G is CWGroup, K name "kwuser"')
+        self.execute('SET K applied_to G WHERE G is CWGroup, K name "kwuser"')
+        self.assertRaises(ValidationError, self.commit)
 
 
     def test_creating_a_new_subkeyword_sets_included_in(self):