server/test/unittest_storage.py
changeset 5717 3c281b6f16c6
parent 5627 a7e40cccdc9b
child 5877 0c7b7b76a84f
--- a/server/test/unittest_storage.py	Thu Jun 10 16:25:15 2010 +0200
+++ b/server/test/unittest_storage.py	Thu Jun 10 16:28:04 2010 +0200
@@ -133,9 +133,15 @@
                                ' UNION '
                                '(Any D WHERE X title D, X is Bookmark)')
         self.assertEquals(str(ex), 'query fetch some source mapped attribute, some not')
-        ex = self.assertRaises(QueryError,
-                               self.execute, 'Any D WHERE X data D')
-        self.assertEquals(str(ex), 'query fetch some source mapped attribute, some not')
+
+        storages.set_attribute_storage(self.repo, 'State', 'name',
+                                       storages.BytesFileSystemStorage(self.tempdir))
+        try:
+            ex = self.assertRaises(QueryError,
+                                   self.execute, 'Any D WHERE X name D, X is IN (State, Transition)')
+            self.assertEquals(str(ex), 'query fetch some source mapped attribute, some not')
+        finally:
+            storages.unset_attribute_storage(self.repo, 'State', 'name')
 
     def test_source_mapped_attribute_advanced(self):
         f1 = self.create_file()