Skip to content

Commit

Permalink
Merge branch 'MrTango/fix-content-type-test-for-non-parents'
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Aug 22, 2019
2 parents 49a6d97 + bdd0cff commit bfdc017
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Changelog
- Change classifiers URL, closes #389.
[ale-rt]

- Fix content_type_test which test the deletion of an object
[MrTango]


4.1.0 (2019-05-31)
------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ class {{{ dexterity_type_name_klass }}}IntegrationTest(unittest.TestCase):
self.assertTrue(IDexterityItem.providedBy(obj))
{{% endif %}}

parent = obj.__parent__
self.assertIn('{{{ dexterity_type_name_normalized }}}', parent.objectIds())

# check that deleting the object works too
api.content.delete(obj=obj)
self.assertNotIn('{{{ dexterity_type_name_normalized }}}', self.parent.objectIds())
self.assertNotIn('{{{ dexterity_type_name_normalized }}}', parent.objectIds())

{{% if dexterity_type_global_allow | to_boolean %}}
def test_ct_{{{ dexterity_type_name_normalized }}}_globally_addable(self):
Expand Down

0 comments on commit bfdc017

Please sign in to comment.