63 try: |
63 try: |
64 expected = getattr(self, 'all_%s' % registry) |
64 expected = getattr(self, 'all_%s' % registry) |
65 except AttributeError: |
65 except AttributeError: |
66 return |
66 return |
67 if registry == 'hooks': |
67 if registry == 'hooks': |
68 self.assertEquals(len(content), expected, content) |
68 self.assertEqual(len(content), expected, content) |
69 return |
69 return |
70 try: |
70 try: |
71 self.assertSetEqual(content.keys(), expected) |
71 self.assertSetEqual(content.keys(), expected) |
72 except: |
72 except: |
73 print registry, sorted(expected), sorted(content.keys()) |
73 print registry, sorted(expected), sorted(content.keys()) |
465 ): |
465 ): |
466 self._test_view(vid, rql, args) |
466 self._test_view(vid, rql, args) |
467 |
467 |
468 |
468 |
469 def test_properties(self): |
469 def test_properties(self): |
|
470 <<<<<<< /home/syt/src/fcubicweb/cubicweb/web/test/unittest_viewselector.py |
470 self.assertEquals(sorted(k for k in self.vreg['propertydefs'].keys() |
471 self.assertEquals(sorted(k for k in self.vreg['propertydefs'].keys() |
471 if k.startswith('ctxcomponents.edit_box')), |
472 if k.startswith('ctxcomponents.edit_box')), |
472 ['ctxcomponents.edit_box.context', |
473 ['ctxcomponents.edit_box.context', |
473 'ctxcomponents.edit_box.order', |
474 'ctxcomponents.edit_box.order', |
474 'ctxcomponents.edit_box.visible']) |
475 'ctxcomponents.edit_box.visible']) |
475 self.assertEquals([k for k in self.vreg['propertyvalues'].keys() |
476 self.assertEquals([k for k in self.vreg['propertyvalues'].keys() |
|
477 ======= |
|
478 self.assertEqual(sorted(k for k in self.vreg['propertydefs'].keys() |
|
479 if k.startswith('boxes.edit_box')), |
|
480 ['boxes.edit_box.context', |
|
481 'boxes.edit_box.order', |
|
482 'boxes.edit_box.visible']) |
|
483 self.assertEqual([k for k in self.vreg['propertyvalues'].keys() |
|
484 >>>>>>> /tmp/unittest_viewselector.py~other.F5zfDM |
476 if not k.startswith('system.version')], |
485 if not k.startswith('system.version')], |
477 []) |
486 []) |
|
487 <<<<<<< /home/syt/src/fcubicweb/cubicweb/web/test/unittest_viewselector.py |
478 self.assertEquals(self.vreg.property_value('ctxcomponents.edit_box.visible'), True) |
488 self.assertEquals(self.vreg.property_value('ctxcomponents.edit_box.visible'), True) |
479 self.assertEquals(self.vreg.property_value('ctxcomponents.edit_box.order'), 2) |
489 self.assertEquals(self.vreg.property_value('ctxcomponents.edit_box.order'), 2) |
480 self.assertEquals(self.vreg.property_value('ctxcomponents.possible_views_box.visible'), False) |
490 self.assertEquals(self.vreg.property_value('ctxcomponents.possible_views_box.visible'), False) |
481 self.assertEquals(self.vreg.property_value('ctxcomponents.possible_views_box.order'), 10) |
491 self.assertEquals(self.vreg.property_value('ctxcomponents.possible_views_box.order'), 10) |
482 self.assertRaises(UnknownProperty, self.vreg.property_value, 'ctxcomponents.actions_box') |
492 self.assertRaises(UnknownProperty, self.vreg.property_value, 'ctxcomponents.actions_box') |
|
493 ======= |
|
494 self.assertEqual(self.vreg.property_value('boxes.edit_box.visible'), True) |
|
495 self.assertEqual(self.vreg.property_value('boxes.edit_box.order'), 2) |
|
496 self.assertEqual(self.vreg.property_value('boxes.possible_views_box.visible'), False) |
|
497 self.assertEqual(self.vreg.property_value('boxes.possible_views_box.order'), 10) |
|
498 self.assertRaises(UnknownProperty, self.vreg.property_value, 'boxes.actions_box') |
|
499 >>>>>>> /tmp/unittest_viewselector.py~other.F5zfDM |
483 |
500 |
484 |
501 |
485 |
502 |
486 |
503 |
487 class CWETypeRQLAction(Action): |
504 class CWETypeRQLAction(Action): |