Skip to content

Commit f230c63

Browse files
committed
improve generated test_ct_..._adding method
1 parent 39de6b8 commit f230c63

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

CHANGES.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ New features:
1414

1515
Bug fixes:
1616

17-
- add min_version = 4.11.0 to addon tempalte tox.ini
17+
- add min_version = 4.11.0 to addon template tox.ini
18+
[MrTango]
19+
20+
- improve generated test_ct_..._adding method
1821
[MrTango]
1922

2023

bobtemplates/plone/content_type/tests/test_ct_+dexterity_type_name_normalized+.py.bob

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,11 @@ class {{{ dexterity_type_name_klass }}}IntegrationTest(unittest.TestCase):
9696

9797
def test_ct_{{{ dexterity_type_name_normalized }}}_adding(self):
9898
setRoles(self.portal, TEST_USER_ID, ['Contributor'])
99-
{{% if dexterity_parent_container_type_name %}}
10099
obj = api.content.create(
101100
container=self.parent,
102101
type='{{{ dexterity_type_name }}}',
103102
id='{{{ dexterity_type_name_normalized }}}',
104103
)
105-
{{% else %}}
106-
obj = api.content.create(
107-
container=self.portal,
108-
type='{{{ dexterity_type_name }}}',
109-
id='{{{ dexterity_type_name_normalized }}}',
110-
)
111-
{{% endif %}}
112104

113105
{{% if dexterity_type_create_class %}}
114106
self.assertTrue(

0 commit comments

Comments
 (0)