diff -r c7c4775a5619 -r 7b88d12b4ee2 web/test/unittest_formfields.py --- a/web/test/unittest_formfields.py Thu Sep 17 15:52:46 2009 +0200 +++ b/web/test/unittest_formfields.py Tue Sep 22 12:11:12 2009 +0200 @@ -128,5 +128,16 @@ self.commit() self.assertEquals(description_format_field.initial(form), 'text/rest') + +class UtilsTC(TestCase): + def test_vocab_sort(self): + self.assertEquals(vocab_sort([('Z', 1), ('A', 2), + ('Group 1', None), ('Y', 3), ('B', 4), + ('Group 2', None), ('X', 5), ('C', 6)]), + [('A', 2), ('Z', 1), + ('Group 1', None), ('B', 4), ('Y', 3), + ('Group 2', None), ('C', 6), ('X', 5)] + ) + if __name__ == '__main__': unittest_main()