6
6
from imio .helpers .testing import IntegrationTestCase
7
7
from plone import api
8
8
9
- import six
10
9
import unittest
11
10
12
11
@@ -19,29 +18,24 @@ def setUp(self):
19
18
self .portal = self .layer ['portal' ]
20
19
21
20
def test_load_type_from_package (self ):
22
- if six .PY3 :
23
- from Products .CMFPlone .utils import get_installer
24
- installer = get_installer (self .portal )
25
- installer .install_product ("plone.app.discussion" )
26
-
27
21
types_tool = api .portal .get_tool ('portal_types' )
28
- portal_type = types_tool .get ('Discussion Item ' )
22
+ portal_type = types_tool .get ('File ' )
29
23
self .assertTrue (portal_type .filter_content_types )
30
24
portal_type .filter_content_types = False
31
25
self .assertFalse (portal_type .filter_content_types )
32
26
self .assertTrue (load_type_from_package (
33
- 'Discussion Item ' , 'plone.app.discussion :default' ))
34
- portal_type = types_tool .get ('Discussion Item ' )
27
+ 'File ' , 'plone.app.contenttypes :default' ))
28
+ portal_type = types_tool .get ('File ' )
35
29
self .assertTrue (portal_type .filter_content_types )
36
30
# not found portal_type
37
31
self .assertFalse (load_type_from_package (
38
- 'Folder2' , 'profile-Products.CMFPlone:plone ' ))
32
+ 'Folder2' , 'plone.app.contenttypes:default ' ))
39
33
# not found profile_id
40
34
self .assertFalse (load_type_from_package (
41
- 'Folder' , 'profile-Products.CMFPlone:plone2 ' ))
35
+ 'Folder' , 'plone.app.contenttypes:default2 ' ))
42
36
# type not managed by given profile_id
43
37
self .assertFalse (load_type_from_package (
44
- 'testingtype' , 'profile-Products.CMFPlone:plone ' ))
38
+ 'testingtype' , 'plone.app.contenttypes:default ' ))
45
39
# reimport a Dexterity fti
46
40
self .assertTrue (load_type_from_package (
47
41
'testingtype' , 'profile-imio.helpers:testing' ))
0 commit comments