web/test/unittest_uicfg.py
changeset 9341 099a3a33eaaa
parent 9273 f3795da61959
--- a/web/test/unittest_uicfg.py	Mon Dec 09 16:13:10 2013 +0100
+++ b/web/test/unittest_uicfg.py	Mon Oct 21 09:58:26 2013 +0200
@@ -73,6 +73,14 @@
         uihelper.set_fields_order('CWUser', ('login', 'firstname', 'surname'))
         self.assertEqual(afk_get('CWUser', 'firstname', 'String', 'subject'), {'order': 1})
 
+    @tag('uicfg', 'order', 'func')
+    def test_uicfg_primaryview_set_fields_order(self):
+        pvdc = uicfg.primaryview_display_ctrl
+        pvdc.set_fields_order('CWUser', ('login', 'firstname', 'surname'))
+        self.assertEqual(pvdc.get('CWUser', 'login', 'String', 'subject'), {'order': 0})
+        self.assertEqual(pvdc.get('CWUser', 'firstname', 'String', 'subject'), {'order': 1})
+        self.assertEqual(pvdc.get('CWUser', 'surname', 'String', 'subject'), {'order': 2})
+
     @tag('uihelper', 'kwargs', 'func')
     def test_uihelper_set_field_kwargs(self):
         afk_get = uicfg.autoform_field_kwargs.get