Commit 687d9a93 authored by Jérome Perrin's avatar Jérome Perrin

base: add Notification Message in document portal type group

So that version view works as expected, see b415abbb (dms: add version
view on notification messages, 2024-06-19)
parent 64c4c520
Pipeline #38537 failed with stage
in 0 seconds
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
<item> <item>
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple/> <tuple>
<string>document</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -291,17 +291,14 @@ class TestDocumentConversionCache(TestDocumentMixin): ...@@ -291,17 +291,14 @@ class TestDocumentConversionCache(TestDocumentMixin):
def test_08_check_conversion_cache_with_portal_document_type_list(self): def test_08_check_conversion_cache_with_portal_document_type_list(self):
"""Check cache conversion for all Portal Document Types """Check cache conversion for all Portal Document Types
""" """
portal_type_list = list(self.portal.getPortalDocumentTypeList()) portal_type_set = set(self.portal.getPortalDocumentTypeList())
# Some conversions are not implemented
portal_type_set.discard('File')
portal_type_set.discard('Notification Message')
portal_type_set.discard('Web Illustration')
portal_type_set.discard('Web Table')
if 'File' in portal_type_list:
#File conversion is not implemented
portal_type_list.remove('File')
if 'Web Illustration' in portal_type_list:
#Web Illustration conversion is not implemented
portal_type_list.remove('Web Illustration')
if 'Web Table' in portal_type_list:
#Web Table conversion is not implemented
portal_type_list.remove('Web Table')
data_mapping = {'Drawing': 'TEST-en-002.sxd', data_mapping = {'Drawing': 'TEST-en-002.sxd',
'Text': 'TEST-en-002.doc', 'Text': 'TEST-en-002.doc',
'Spreadsheet': 'TEST-en-002.sxc', 'Spreadsheet': 'TEST-en-002.sxc',
...@@ -311,8 +308,8 @@ class TestDocumentConversionCache(TestDocumentMixin): ...@@ -311,8 +308,8 @@ class TestDocumentConversionCache(TestDocumentMixin):
'File': 'TEST-en-002.rtf', 'File': 'TEST-en-002.rtf',
'PDF': 'TEST-en-002.pdf'} 'PDF': 'TEST-en-002.pdf'}
#Check that all portal_types are handled by test #Check that all portal_types are handled by test
self.assertEqual(len(portal_type_list), len([pt for pt in portal_type_list if pt in data_mapping])) self.assertEqual(len(portal_type_set), len([pt for pt in portal_type_set if pt in data_mapping]))
for portal_type in portal_type_list: for portal_type in portal_type_set:
module = self.portal.getDefaultModule(portal_type=portal_type) module = self.portal.getDefaultModule(portal_type=portal_type)
upload_file = self.makeFileUpload(data_mapping[portal_type]) upload_file = self.makeFileUpload(data_mapping[portal_type])
document = module.newContent(portal_type=portal_type) document = module.newContent(portal_type=portal_type)
......
...@@ -104,7 +104,7 @@ class TestSupportRequestCreateNewSupportRequest(SupportRequestTestCase): ...@@ -104,7 +104,7 @@ class TestSupportRequestCreateNewSupportRequest(SupportRequestTestCase):
p for p in self.portal.getPortalDocumentTypeList() \ p for p in self.portal.getPortalDocumentTypeList() \
if p not in ("Sound", "Video", "Web Page", 'Video', 'Web Illustration', if p not in ("Sound", "Video", "Web Page", 'Video', 'Web Illustration',
'Web Manifest', 'Web Page', 'Web Script', 'Web Style', 'Web Manifest', 'Web Page', 'Web Script', 'Web Style',
'Web Table', 'Notebook')] 'Web Table', 'Notebook', 'Notification Message')]
# Should not happens but we never know # Should not happens but we never know
assert portal_type_list, portal_type_list assert portal_type_list, portal_type_list
......
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