361 card = rschema.rdef('Personne', 'String').fulltextindexed |
361 card = rschema.rdef('Personne', 'String').fulltextindexed |
362 self.assertEqual(card, True) |
362 self.assertEqual(card, True) |
363 finally: |
363 finally: |
364 self.mh.cmd_change_relation_props('Personne', 'adel', 'String', |
364 self.mh.cmd_change_relation_props('Personne', 'adel', 'String', |
365 fulltextindexed=False) |
365 fulltextindexed=False) |
|
366 |
|
367 def test_sync_schema_props_perms_rqlconstraints(self): |
|
368 # Drop one of the RQLConstraint. |
|
369 rdef = self.schema['evaluee'].rdefs[('Personne', 'Note')] |
|
370 oldconstraints = rdef.constraints |
|
371 self.assertIn('S created_by U', |
|
372 [cstr.expression for cstr in oldconstraints]) |
|
373 self.mh.cmd_sync_schema_props_perms('evaluee', commit=True) |
|
374 newconstraints = rdef.constraints |
|
375 self.assertNotIn('S created_by U', |
|
376 [cstr.expression for cstr in newconstraints]) |
|
377 |
|
378 # Drop all RQLConstraint. |
|
379 rdef = self.schema['travaille'].rdefs[('Personne', 'Societe')] |
|
380 oldconstraints = rdef.constraints |
|
381 self.assertEqual(len(oldconstraints), 2) |
|
382 self.mh.cmd_sync_schema_props_perms('travaille', commit=True) |
|
383 rdef = self.schema['travaille'].rdefs[('Personne', 'Societe')] |
|
384 newconstraints = rdef.constraints |
|
385 self.assertEqual(len(newconstraints), 0) |
366 |
386 |
367 @tag('longrun') |
387 @tag('longrun') |
368 def test_sync_schema_props_perms(self): |
388 def test_sync_schema_props_perms(self): |
369 cursor = self.mh.session |
389 cursor = self.mh.session |
370 cursor.set_cnxset() |
390 cursor.set_cnxset() |