Commit e953c541 authored by Romain Courteaud's avatar Romain Courteaud

Check that receiving an empty string as language parameter (as done when using...

Check that receiving an empty string as language parameter (as done when using listbox search) correctly returns user language documents.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31821 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 33b6b4a9
...@@ -506,6 +506,13 @@ Hé Hé Hé!""", page.asText().strip()) ...@@ -506,6 +506,13 @@ Hé Hé Hé!""", page.asText().strip())
self.assertEqual(['en' , 'en', 'en', 'en'], self.assertEqual(['en' , 'en', 'en', 'en'],
[ w.getLanguage() for w in websection.getDocumentValueList()]) [ w.getLanguage() for w in websection.getDocumentValueList()])
# Check that receiving an empty string as language parameter (as done
# when using listbox search) correctly returns user language documents.
default_document_value_list = websection.getDocumentValueList(language='')
self.assertEqual(4, len(default_document_value_list))
self.assertEqual(['en', 'en', 'en', 'en'],
[ w.getLanguage() for w in default_document_value_list])
pt_document_value_list = websection.getDocumentValueList(language='pt') pt_document_value_list = websection.getDocumentValueList(language='pt')
self.assertEqual(4, len(pt_document_value_list)) self.assertEqual(4, len(pt_document_value_list))
self.assertEqual(['pt' , 'pt', 'pt', 'pt'], self.assertEqual(['pt' , 'pt', 'pt', 'pt'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment